SlideShare a Scribd company logo
Microprocessors systems
Vlasov Sergey
smvlasov@itmo.ru
Kirsanova Aleksandra
ARM
Advanced RISC Machine <=> Acorn RISC Machine
• ARM7
• ARM9, ARM11
• Cortex A
• Cortex M
• Cortex-M0, Cortex-M0+, Cortex-M1
• Cortex-M3
• Cortex-M4, Cortex-M7
• Cortex-M23, Cortex-M33
RISC
reduced instruction set computer
• RISC processors use a small and limited number of
instructions
• RISC machines mostly uses hardwired control unit
• RISC processors consume less power and have high
performance
• Each instruction is very simple and consistent
• RISC processors use simple addressing modes
• RISC instruction is of uniform fixed length
• Large Number of Registers
ARM Cortex-M
• Microcontrollers
• ASIC (Application-specific integrated circuit)
• ASSP (Application-specific standard product)
• FPGA
• SoC (System-on-crystal)
ARM Cortex-M
Arm Core
Cortex
M0
Cortex
M0+
Cortex
M1
Cortex
M3
Cortex
M4
Cortex
M7
Cortex
M23
Cortex
M33
Cortex
M35P
ARM architecture ARMv6-M ARMv6-M ARMv6-M ARMv7-M ARMv7E-M ARMv7E-M
ARMv8-M
Baseline
ARMv8-M
Mainline
ARMv8-M
Mainline
Computer architecture
Von
Neuman
Von
Neumann
Von
Neumann
Harvard Harvard Harvard Von Neumann Harvard Harvard
Instruction pipeline 3 stages 2 stages 3 stages 3 stages 3 stages 6 stages 2 stages 3 stages 3 stages
Thumb-1 instructions Most Most Most Entire Entire Entire Most Entire Entire
Thumb-2 instructions Some Some Some Entire Entire Entire Some Entire Entire
Multiply instructions
32x32 = 32-bit result
Yes Yes Yes Yes Yes Yes Yes Yes Yes
Multiply instructions
32x32 = 64-bit result
No No No Yes Yes Yes No Yes Yes
Divide instructions
32/32 = 32-bit quotient
No No No Yes Yes Yes Yes Yes Yes
Saturated instructions No No No Some Yes Yes No Yes Yes
DSP instructions No No No No Yes Yes No Optional Optional
Interrupt latency
(if zero-wait state RAM)
16 cycles 15 cycles
23 for NMI
26 for IRQ
12 cycles 12 cycles 12 cycles
15 no security
ext
27 security ext
TBD TBD
ARM Cortex-M
Von Neumann (Princeton) Harvard
ARM Cortex-M
Instruction pipeline
•IF — Instruction Fetch,
•ID — Instruction Decode,
•EX — Execute,
•MEM — Memory access,
•WB — Register write back.
ARM Cortex-M
Instruction pipeline
Pipeline states:
1. Fetch
2. Decode
3. Execute
4. Write-back
ARM Cortex-M
Instruction pipeline
Pipeline states:
1. Fetch
2. Decode
3. Execute
4. Write-back
ARM Cortex-M
Processor registers
The processor has the following 32-bit registers:
• 13 general-purpose registers, r0-r12
• Stack Pointer (SP) alias of banked registers,
SP_process and SP_main
• Link Register (LR), r14
• Program Counter (PC), r15
• Special-purpose Program Status Registers,
(xPSR).
ARM Cortex-M
Processor registers
ARM Cortex-M
STM32
ARM Cortex-M – STM32
ARM Cortex-M – STM32
ARM Cortex-M
Memory
ARM Cortex-M – STM32
Power
ARM Cortex-M
Clock tree
General-purpose I/O
Main features
• Up to 16 I/Os under control
• Output states: push-pull or open drain + pull-up/down
• Output data from output data register (GPIOx_ODR)
• Speed selection for each I/O
• Input states: floating, pull-up/down, analog
• Input data to input data register (GPIOx_IDR)
• Bit set and reset register (GPIOx_BSRR) for bitwise write access to GPIOx_ODR
• Locking mechanism (GPIOx_LCKR) provided to freeze the I/O configuration
• Analog function
• Alternate function input/output selection registers (at most 16 AFs per I/O)
• Fast toggle capable of changing every two clock cycles
• Highly flexible pin multiplexing allows the use of I/O pins as GPIOs or as
one of several peripheral functions
General-purpose I/O
General-purpose I/O
Input configuration
General-purpose I/O
Output configuration
General-purpose I/O
Alternate function configuration
General-purpose I/O
Selecting an alternate function
Port
AF0
SYS
AF1
TIM1/2
Afn
…
PORTA
PA0 -
TIM2_CH1/
TIM2_ETR
…
PA1 - TIM2_CH2 …
PAn - TIM2_CH3 …
…
… … … …
General-purpose I/O
Analog configuration
ARM Cortex-M
Example. Work with registers
button = *((uint32_t *)(0x40000000U + 0x00020000 + 0x10)) & 0x1;
button = GPIOA->IDR & GPIO_IDR_ID0;
Task 1. Read button state
• PERIPH_BASE = 0x40000000
• AHB1_BASE = PERIPH_BASE + 0x00020000
• GPIOA_BASE = AHB1_BASE + 0x0000
• Input Data Reg = 0x10
ARM Cortex-M
Example. Work with registers
*((uint32_t *)(0x40000000 + 0x00020000 + 0x0C00 + 0x14)) =
*((uint32_t *)(0x40000000 + 0x00020000 + 0x0C00 + 0x14)) | 0x1000;
GPIOD->ODR = GPIOD->ODR | GPIO_ODR_OD12; <=> GPIO->ODR |= 1 << 12;
Task 2. Turn led On
• PERIPH_BASE = 0x40000000
• AHB1_BASE = PERIPH_BASE + 0x00020000
• GPIOD_BASE = AHB1_BASE + 0x0C00
• Output Data Reg = 0x14
Read -> Modify -> Write
ARM Cortex-M
Bit Banding
Address in the bit band alias region = Bit band alias base address + bit word offset
Where bit word offset = Byte offset from bit band base X32 + bit number X4
• PERIPH_BASE = 0x40000000 (PER_Base)
• GPIOD->ODR = 0x40020C14 (WORD)
• Bit Band Alias base = 0x42000000 (BBA_Base)
• PIN = 12
• BIT = BBA_Base + (WORD – PER_Base)*32 + PIN*4;
Byte offset from bit band base Bit number
Thank you for your attention
www.ifmo.ru

More Related Content

What's hot

The ARM Architecture: ARM : ARM Architecture
The ARM Architecture: ARM : ARM ArchitectureThe ARM Architecture: ARM : ARM Architecture
The ARM Architecture: ARM : ARM Architecture
sreea4
 
Introduction to stm32-part2
Introduction to stm32-part2Introduction to stm32-part2
SOC Processors Used in SOC
SOC Processors Used in SOCSOC Processors Used in SOC
SOC Processors Used in SOC
A B Shinde
 
PIC MICROCONTROLLERS -CLASS NOTES
PIC MICROCONTROLLERS -CLASS NOTESPIC MICROCONTROLLERS -CLASS NOTES
PIC MICROCONTROLLERS -CLASS NOTES
Dr.YNM
 
Mips architecture
Mips architectureMips architecture
Mips architecture
Rashid Ahmad
 
ARM Processors
ARM ProcessorsARM Processors
ARM Processors
Mathivanan Natarajan
 
Module 1 - ARM 32 Bit Microcontroller
Module 1 - ARM 32 Bit Microcontroller Module 1 - ARM 32 Bit Microcontroller
Module 1 - ARM 32 Bit Microcontroller
Amogha Bandrikalli
 
Linux device drivers
Linux device drivers Linux device drivers
Arm architecture
Arm architectureArm architecture
Arm architecture
MinYeop Na
 
L10 assembly-language-programming-of-atmega328 p
L10 assembly-language-programming-of-atmega328 pL10 assembly-language-programming-of-atmega328 p
L10 assembly-language-programming-of-atmega328 p
rsamurti
 
Unit II Arm7 Thumb Instruction
Unit II Arm7 Thumb InstructionUnit II Arm7 Thumb Instruction
Unit II Arm7 Thumb Instruction
Dr. Pankaj Zope
 
Arm processors' architecture
Arm processors'   architectureArm processors'   architecture
Arm processors' architecture
Dr.YNM
 
SoC Design
SoC DesignSoC Design
Arm architecture
Arm architectureArm architecture
Risc cisc Difference
Risc cisc DifferenceRisc cisc Difference
Risc cisc Difference
Sehrish Asif
 
Embedded Systems (18EC62) - ARM Cortex-M3 Instruction Set and Programming (Mo...
Embedded Systems (18EC62) - ARM Cortex-M3 Instruction Set and Programming (Mo...Embedded Systems (18EC62) - ARM Cortex-M3 Instruction Set and Programming (Mo...
Embedded Systems (18EC62) - ARM Cortex-M3 Instruction Set and Programming (Mo...
Shrishail Bhat
 
Introducion to MSP430 Microcontroller.pptx
Introducion to MSP430 Microcontroller.pptxIntroducion to MSP430 Microcontroller.pptx
Introducion to MSP430 Microcontroller.pptx
Dr.YNM
 
PIC 16F877 micro controller by Gaurav raikar
PIC 16F877 micro controller by Gaurav raikarPIC 16F877 micro controller by Gaurav raikar
PIC 16F877 micro controller by Gaurav raikar
GauravRaikar3
 
ARM architcture
ARM architcture ARM architcture
ARM architcture
Hossam Adel
 
Arm
ArmArm

What's hot (20)

The ARM Architecture: ARM : ARM Architecture
The ARM Architecture: ARM : ARM ArchitectureThe ARM Architecture: ARM : ARM Architecture
The ARM Architecture: ARM : ARM Architecture
 
Introduction to stm32-part2
Introduction to stm32-part2Introduction to stm32-part2
Introduction to stm32-part2
 
SOC Processors Used in SOC
SOC Processors Used in SOCSOC Processors Used in SOC
SOC Processors Used in SOC
 
PIC MICROCONTROLLERS -CLASS NOTES
PIC MICROCONTROLLERS -CLASS NOTESPIC MICROCONTROLLERS -CLASS NOTES
PIC MICROCONTROLLERS -CLASS NOTES
 
Mips architecture
Mips architectureMips architecture
Mips architecture
 
ARM Processors
ARM ProcessorsARM Processors
ARM Processors
 
Module 1 - ARM 32 Bit Microcontroller
Module 1 - ARM 32 Bit Microcontroller Module 1 - ARM 32 Bit Microcontroller
Module 1 - ARM 32 Bit Microcontroller
 
Linux device drivers
Linux device drivers Linux device drivers
Linux device drivers
 
Arm architecture
Arm architectureArm architecture
Arm architecture
 
L10 assembly-language-programming-of-atmega328 p
L10 assembly-language-programming-of-atmega328 pL10 assembly-language-programming-of-atmega328 p
L10 assembly-language-programming-of-atmega328 p
 
Unit II Arm7 Thumb Instruction
Unit II Arm7 Thumb InstructionUnit II Arm7 Thumb Instruction
Unit II Arm7 Thumb Instruction
 
Arm processors' architecture
Arm processors'   architectureArm processors'   architecture
Arm processors' architecture
 
SoC Design
SoC DesignSoC Design
SoC Design
 
Arm architecture
Arm architectureArm architecture
Arm architecture
 
Risc cisc Difference
Risc cisc DifferenceRisc cisc Difference
Risc cisc Difference
 
Embedded Systems (18EC62) - ARM Cortex-M3 Instruction Set and Programming (Mo...
Embedded Systems (18EC62) - ARM Cortex-M3 Instruction Set and Programming (Mo...Embedded Systems (18EC62) - ARM Cortex-M3 Instruction Set and Programming (Mo...
Embedded Systems (18EC62) - ARM Cortex-M3 Instruction Set and Programming (Mo...
 
Introducion to MSP430 Microcontroller.pptx
Introducion to MSP430 Microcontroller.pptxIntroducion to MSP430 Microcontroller.pptx
Introducion to MSP430 Microcontroller.pptx
 
PIC 16F877 micro controller by Gaurav raikar
PIC 16F877 micro controller by Gaurav raikarPIC 16F877 micro controller by Gaurav raikar
PIC 16F877 micro controller by Gaurav raikar
 
ARM architcture
ARM architcture ARM architcture
ARM architcture
 
Arm
ArmArm
Arm
 

Similar to Lecture 1.pptx

LPC 2148 Instructions Set.ppt
LPC 2148 Instructions Set.pptLPC 2148 Instructions Set.ppt
LPC 2148 Instructions Set.ppt
ProfBadariNathK
 
arm_3.ppt
arm_3.pptarm_3.ppt
arm_3.ppt
MostafaParvin1
 
AAME ARM Techcon2013 001v02 Architecture and Programmer's model
AAME ARM Techcon2013 001v02 Architecture and Programmer's modelAAME ARM Techcon2013 001v02 Architecture and Programmer's model
AAME ARM Techcon2013 001v02 Architecture and Programmer's model
Anh Dung NGUYEN
 
Arm corrected ppt
Arm corrected pptArm corrected ppt
Arm corrected ppt
anish jagan
 
2 introduction to arm architecture
2 introduction to arm architecture2 introduction to arm architecture
2 introduction to arm architecture
satish1jisatishji
 
Arm
ArmArm
arm
armarm
Arm cortex-m3 by-joe_bungo_arm
Arm cortex-m3 by-joe_bungo_armArm cortex-m3 by-joe_bungo_arm
Arm cortex-m3 by-joe_bungo_arm
Prashant Ahire
 
Arm processor
Arm processorArm processor
Arm processor
PrashantSingh056
 
LPC 2148 ARM MICROCONTROLLER
LPC 2148 ARM MICROCONTROLLERLPC 2148 ARM MICROCONTROLLER
LPC 2148 ARM MICROCONTROLLER
sravannunna24
 
ARM stacks, subroutines, Cortex M3, LPC 214X
ARM  stacks, subroutines, Cortex M3, LPC 214XARM  stacks, subroutines, Cortex M3, LPC 214X
ARM stacks, subroutines, Cortex M3, LPC 214X
Karthik Vivek
 
Arm cortex-m4 programmer model
Arm cortex-m4 programmer modelArm cortex-m4 programmer model
Arm cortex-m4 programmer model
Mohammed Gomaa
 
ARM Versions, architecture
ARM Versions, architectureARM Versions, architecture
ARM Versions, architecture
Karthik Vivek
 
Introduction to ARM Architecture
Introduction to ARM ArchitectureIntroduction to ARM Architecture
Introduction to ARM Architecture
Racharla Rohit Varma
 
ARM Processor
ARM ProcessorARM Processor
ARM Processor
Aniket Thakur
 
Arm
ArmArm
Arm architecture overview
Arm architecture overviewArm architecture overview
Arm architecture overview
Sathish Arumugasamy
 
17 october embedded seminar
17 october embedded seminar17 october embedded seminar
17 october embedded seminar
Amir Sherman
 
ARM
ARM ARM
Digital electronics
Digital electronicsDigital electronics
Digital electronics
Sudipta Chatterjee
 

Similar to Lecture 1.pptx (20)

LPC 2148 Instructions Set.ppt
LPC 2148 Instructions Set.pptLPC 2148 Instructions Set.ppt
LPC 2148 Instructions Set.ppt
 
arm_3.ppt
arm_3.pptarm_3.ppt
arm_3.ppt
 
AAME ARM Techcon2013 001v02 Architecture and Programmer's model
AAME ARM Techcon2013 001v02 Architecture and Programmer's modelAAME ARM Techcon2013 001v02 Architecture and Programmer's model
AAME ARM Techcon2013 001v02 Architecture and Programmer's model
 
Arm corrected ppt
Arm corrected pptArm corrected ppt
Arm corrected ppt
 
2 introduction to arm architecture
2 introduction to arm architecture2 introduction to arm architecture
2 introduction to arm architecture
 
Arm
ArmArm
Arm
 
arm
armarm
arm
 
Arm cortex-m3 by-joe_bungo_arm
Arm cortex-m3 by-joe_bungo_armArm cortex-m3 by-joe_bungo_arm
Arm cortex-m3 by-joe_bungo_arm
 
Arm processor
Arm processorArm processor
Arm processor
 
LPC 2148 ARM MICROCONTROLLER
LPC 2148 ARM MICROCONTROLLERLPC 2148 ARM MICROCONTROLLER
LPC 2148 ARM MICROCONTROLLER
 
ARM stacks, subroutines, Cortex M3, LPC 214X
ARM  stacks, subroutines, Cortex M3, LPC 214XARM  stacks, subroutines, Cortex M3, LPC 214X
ARM stacks, subroutines, Cortex M3, LPC 214X
 
Arm cortex-m4 programmer model
Arm cortex-m4 programmer modelArm cortex-m4 programmer model
Arm cortex-m4 programmer model
 
ARM Versions, architecture
ARM Versions, architectureARM Versions, architecture
ARM Versions, architecture
 
Introduction to ARM Architecture
Introduction to ARM ArchitectureIntroduction to ARM Architecture
Introduction to ARM Architecture
 
ARM Processor
ARM ProcessorARM Processor
ARM Processor
 
Arm
ArmArm
Arm
 
Arm architecture overview
Arm architecture overviewArm architecture overview
Arm architecture overview
 
17 october embedded seminar
17 october embedded seminar17 october embedded seminar
17 october embedded seminar
 
ARM
ARM ARM
ARM
 
Digital electronics
Digital electronicsDigital electronics
Digital electronics
 

More from GautamDhargalkar1

Lecture 6.pptx
Lecture 6.pptxLecture 6.pptx
Lecture 6.pptx
GautamDhargalkar1
 
Lecture 5.pptx
Lecture 5.pptxLecture 5.pptx
Lecture 5.pptx
GautamDhargalkar1
 
Lecture 4.pptx
Lecture 4.pptxLecture 4.pptx
Lecture 4.pptx
GautamDhargalkar1
 
Lecture 3.pptx
Lecture 3.pptxLecture 3.pptx
Lecture 3.pptx
GautamDhargalkar1
 
Lecture 2.pptx
Lecture 2.pptxLecture 2.pptx
Lecture 2.pptx
GautamDhargalkar1
 
Indian_Flag_Template.potx
Indian_Flag_Template.potxIndian_Flag_Template.potx
Indian_Flag_Template.potx
GautamDhargalkar1
 
Typical_Techniques_for_Eliminating_Physical_Contradictions-Needs corrections.ppt
Typical_Techniques_for_Eliminating_Physical_Contradictions-Needs corrections.pptTypical_Techniques_for_Eliminating_Physical_Contradictions-Needs corrections.ppt
Typical_Techniques_for_Eliminating_Physical_Contradictions-Needs corrections.ppt
GautamDhargalkar1
 

More from GautamDhargalkar1 (7)

Lecture 6.pptx
Lecture 6.pptxLecture 6.pptx
Lecture 6.pptx
 
Lecture 5.pptx
Lecture 5.pptxLecture 5.pptx
Lecture 5.pptx
 
Lecture 4.pptx
Lecture 4.pptxLecture 4.pptx
Lecture 4.pptx
 
Lecture 3.pptx
Lecture 3.pptxLecture 3.pptx
Lecture 3.pptx
 
Lecture 2.pptx
Lecture 2.pptxLecture 2.pptx
Lecture 2.pptx
 
Indian_Flag_Template.potx
Indian_Flag_Template.potxIndian_Flag_Template.potx
Indian_Flag_Template.potx
 
Typical_Techniques_for_Eliminating_Physical_Contradictions-Needs corrections.ppt
Typical_Techniques_for_Eliminating_Physical_Contradictions-Needs corrections.pptTypical_Techniques_for_Eliminating_Physical_Contradictions-Needs corrections.ppt
Typical_Techniques_for_Eliminating_Physical_Contradictions-Needs corrections.ppt
 

Recently uploaded

Embedded machine learning-based road conditions and driving behavior monitoring
Embedded machine learning-based road conditions and driving behavior monitoringEmbedded machine learning-based road conditions and driving behavior monitoring
Embedded machine learning-based road conditions and driving behavior monitoring
IJECEIAES
 
Software Engineering and Project Management - Software Testing + Agile Method...
Software Engineering and Project Management - Software Testing + Agile Method...Software Engineering and Project Management - Software Testing + Agile Method...
Software Engineering and Project Management - Software Testing + Agile Method...
Prakhyath Rai
 
Computational Engineering IITH Presentation
Computational Engineering IITH PresentationComputational Engineering IITH Presentation
Computational Engineering IITH Presentation
co23btech11018
 
AI for Legal Research with applications, tools
AI for Legal Research with applications, toolsAI for Legal Research with applications, tools
AI for Legal Research with applications, tools
mahaffeycheryld
 
原版制作(Humboldt毕业证书)柏林大学毕业证学位证一模一样
原版制作(Humboldt毕业证书)柏林大学毕业证学位证一模一样原版制作(Humboldt毕业证书)柏林大学毕业证学位证一模一样
原版制作(Humboldt毕业证书)柏林大学毕业证学位证一模一样
ydzowc
 
Use PyCharm for remote debugging of WSL on a Windo cf5c162d672e4e58b4dde5d797...
Use PyCharm for remote debugging of WSL on a Windo cf5c162d672e4e58b4dde5d797...Use PyCharm for remote debugging of WSL on a Windo cf5c162d672e4e58b4dde5d797...
Use PyCharm for remote debugging of WSL on a Windo cf5c162d672e4e58b4dde5d797...
shadow0702a
 
Software Engineering and Project Management - Introduction, Modeling Concepts...
Software Engineering and Project Management - Introduction, Modeling Concepts...Software Engineering and Project Management - Introduction, Modeling Concepts...
Software Engineering and Project Management - Introduction, Modeling Concepts...
Prakhyath Rai
 
一比一原版(uofo毕业证书)美国俄勒冈大学毕业证如何办理
一比一原版(uofo毕业证书)美国俄勒冈大学毕业证如何办理一比一原版(uofo毕业证书)美国俄勒冈大学毕业证如何办理
一比一原版(uofo毕业证书)美国俄勒冈大学毕业证如何办理
upoux
 
SCALING OF MOS CIRCUITS m .pptx
SCALING OF MOS CIRCUITS m                 .pptxSCALING OF MOS CIRCUITS m                 .pptx
SCALING OF MOS CIRCUITS m .pptx
harshapolam10
 
Advanced control scheme of doubly fed induction generator for wind turbine us...
Advanced control scheme of doubly fed induction generator for wind turbine us...Advanced control scheme of doubly fed induction generator for wind turbine us...
Advanced control scheme of doubly fed induction generator for wind turbine us...
IJECEIAES
 
Null Bangalore | Pentesters Approach to AWS IAM
Null Bangalore | Pentesters Approach to AWS IAMNull Bangalore | Pentesters Approach to AWS IAM
Null Bangalore | Pentesters Approach to AWS IAM
Divyanshu
 
Welding Metallurgy Ferrous Materials.pdf
Welding Metallurgy Ferrous Materials.pdfWelding Metallurgy Ferrous Materials.pdf
Welding Metallurgy Ferrous Materials.pdf
AjmalKhan50578
 
TIME TABLE MANAGEMENT SYSTEM testing.pptx
TIME TABLE MANAGEMENT SYSTEM testing.pptxTIME TABLE MANAGEMENT SYSTEM testing.pptx
TIME TABLE MANAGEMENT SYSTEM testing.pptx
CVCSOfficial
 
132/33KV substation case study Presentation
132/33KV substation case study Presentation132/33KV substation case study Presentation
132/33KV substation case study Presentation
kandramariana6
 
Generative AI Use cases applications solutions and implementation.pdf
Generative AI Use cases applications solutions and implementation.pdfGenerative AI Use cases applications solutions and implementation.pdf
Generative AI Use cases applications solutions and implementation.pdf
mahaffeycheryld
 
一比一原版(CalArts毕业证)加利福尼亚艺术学院毕业证如何办理
一比一原版(CalArts毕业证)加利福尼亚艺术学院毕业证如何办理一比一原版(CalArts毕业证)加利福尼亚艺术学院毕业证如何办理
一比一原版(CalArts毕业证)加利福尼亚艺术学院毕业证如何办理
ecqow
 
Applications of artificial Intelligence in Mechanical Engineering.pdf
Applications of artificial Intelligence in Mechanical Engineering.pdfApplications of artificial Intelligence in Mechanical Engineering.pdf
Applications of artificial Intelligence in Mechanical Engineering.pdf
Atif Razi
 
Digital Twins Computer Networking Paper Presentation.pptx
Digital Twins Computer Networking Paper Presentation.pptxDigital Twins Computer Networking Paper Presentation.pptx
Digital Twins Computer Networking Paper Presentation.pptx
aryanpankaj78
 
Prediction of Electrical Energy Efficiency Using Information on Consumer's Ac...
Prediction of Electrical Energy Efficiency Using Information on Consumer's Ac...Prediction of Electrical Energy Efficiency Using Information on Consumer's Ac...
Prediction of Electrical Energy Efficiency Using Information on Consumer's Ac...
PriyankaKilaniya
 
Properties Railway Sleepers and Test.pptx
Properties Railway Sleepers and Test.pptxProperties Railway Sleepers and Test.pptx
Properties Railway Sleepers and Test.pptx
MDSABBIROJJAMANPAYEL
 

Recently uploaded (20)

Embedded machine learning-based road conditions and driving behavior monitoring
Embedded machine learning-based road conditions and driving behavior monitoringEmbedded machine learning-based road conditions and driving behavior monitoring
Embedded machine learning-based road conditions and driving behavior monitoring
 
Software Engineering and Project Management - Software Testing + Agile Method...
Software Engineering and Project Management - Software Testing + Agile Method...Software Engineering and Project Management - Software Testing + Agile Method...
Software Engineering and Project Management - Software Testing + Agile Method...
 
Computational Engineering IITH Presentation
Computational Engineering IITH PresentationComputational Engineering IITH Presentation
Computational Engineering IITH Presentation
 
AI for Legal Research with applications, tools
AI for Legal Research with applications, toolsAI for Legal Research with applications, tools
AI for Legal Research with applications, tools
 
原版制作(Humboldt毕业证书)柏林大学毕业证学位证一模一样
原版制作(Humboldt毕业证书)柏林大学毕业证学位证一模一样原版制作(Humboldt毕业证书)柏林大学毕业证学位证一模一样
原版制作(Humboldt毕业证书)柏林大学毕业证学位证一模一样
 
Use PyCharm for remote debugging of WSL on a Windo cf5c162d672e4e58b4dde5d797...
Use PyCharm for remote debugging of WSL on a Windo cf5c162d672e4e58b4dde5d797...Use PyCharm for remote debugging of WSL on a Windo cf5c162d672e4e58b4dde5d797...
Use PyCharm for remote debugging of WSL on a Windo cf5c162d672e4e58b4dde5d797...
 
Software Engineering and Project Management - Introduction, Modeling Concepts...
Software Engineering and Project Management - Introduction, Modeling Concepts...Software Engineering and Project Management - Introduction, Modeling Concepts...
Software Engineering and Project Management - Introduction, Modeling Concepts...
 
一比一原版(uofo毕业证书)美国俄勒冈大学毕业证如何办理
一比一原版(uofo毕业证书)美国俄勒冈大学毕业证如何办理一比一原版(uofo毕业证书)美国俄勒冈大学毕业证如何办理
一比一原版(uofo毕业证书)美国俄勒冈大学毕业证如何办理
 
SCALING OF MOS CIRCUITS m .pptx
SCALING OF MOS CIRCUITS m                 .pptxSCALING OF MOS CIRCUITS m                 .pptx
SCALING OF MOS CIRCUITS m .pptx
 
Advanced control scheme of doubly fed induction generator for wind turbine us...
Advanced control scheme of doubly fed induction generator for wind turbine us...Advanced control scheme of doubly fed induction generator for wind turbine us...
Advanced control scheme of doubly fed induction generator for wind turbine us...
 
Null Bangalore | Pentesters Approach to AWS IAM
Null Bangalore | Pentesters Approach to AWS IAMNull Bangalore | Pentesters Approach to AWS IAM
Null Bangalore | Pentesters Approach to AWS IAM
 
Welding Metallurgy Ferrous Materials.pdf
Welding Metallurgy Ferrous Materials.pdfWelding Metallurgy Ferrous Materials.pdf
Welding Metallurgy Ferrous Materials.pdf
 
TIME TABLE MANAGEMENT SYSTEM testing.pptx
TIME TABLE MANAGEMENT SYSTEM testing.pptxTIME TABLE MANAGEMENT SYSTEM testing.pptx
TIME TABLE MANAGEMENT SYSTEM testing.pptx
 
132/33KV substation case study Presentation
132/33KV substation case study Presentation132/33KV substation case study Presentation
132/33KV substation case study Presentation
 
Generative AI Use cases applications solutions and implementation.pdf
Generative AI Use cases applications solutions and implementation.pdfGenerative AI Use cases applications solutions and implementation.pdf
Generative AI Use cases applications solutions and implementation.pdf
 
一比一原版(CalArts毕业证)加利福尼亚艺术学院毕业证如何办理
一比一原版(CalArts毕业证)加利福尼亚艺术学院毕业证如何办理一比一原版(CalArts毕业证)加利福尼亚艺术学院毕业证如何办理
一比一原版(CalArts毕业证)加利福尼亚艺术学院毕业证如何办理
 
Applications of artificial Intelligence in Mechanical Engineering.pdf
Applications of artificial Intelligence in Mechanical Engineering.pdfApplications of artificial Intelligence in Mechanical Engineering.pdf
Applications of artificial Intelligence in Mechanical Engineering.pdf
 
Digital Twins Computer Networking Paper Presentation.pptx
Digital Twins Computer Networking Paper Presentation.pptxDigital Twins Computer Networking Paper Presentation.pptx
Digital Twins Computer Networking Paper Presentation.pptx
 
Prediction of Electrical Energy Efficiency Using Information on Consumer's Ac...
Prediction of Electrical Energy Efficiency Using Information on Consumer's Ac...Prediction of Electrical Energy Efficiency Using Information on Consumer's Ac...
Prediction of Electrical Energy Efficiency Using Information on Consumer's Ac...
 
Properties Railway Sleepers and Test.pptx
Properties Railway Sleepers and Test.pptxProperties Railway Sleepers and Test.pptx
Properties Railway Sleepers and Test.pptx
 

Lecture 1.pptx

  • 2. ARM Advanced RISC Machine <=> Acorn RISC Machine • ARM7 • ARM9, ARM11 • Cortex A • Cortex M • Cortex-M0, Cortex-M0+, Cortex-M1 • Cortex-M3 • Cortex-M4, Cortex-M7 • Cortex-M23, Cortex-M33
  • 3. RISC reduced instruction set computer • RISC processors use a small and limited number of instructions • RISC machines mostly uses hardwired control unit • RISC processors consume less power and have high performance • Each instruction is very simple and consistent • RISC processors use simple addressing modes • RISC instruction is of uniform fixed length • Large Number of Registers
  • 4. ARM Cortex-M • Microcontrollers • ASIC (Application-specific integrated circuit) • ASSP (Application-specific standard product) • FPGA • SoC (System-on-crystal)
  • 5. ARM Cortex-M Arm Core Cortex M0 Cortex M0+ Cortex M1 Cortex M3 Cortex M4 Cortex M7 Cortex M23 Cortex M33 Cortex M35P ARM architecture ARMv6-M ARMv6-M ARMv6-M ARMv7-M ARMv7E-M ARMv7E-M ARMv8-M Baseline ARMv8-M Mainline ARMv8-M Mainline Computer architecture Von Neuman Von Neumann Von Neumann Harvard Harvard Harvard Von Neumann Harvard Harvard Instruction pipeline 3 stages 2 stages 3 stages 3 stages 3 stages 6 stages 2 stages 3 stages 3 stages Thumb-1 instructions Most Most Most Entire Entire Entire Most Entire Entire Thumb-2 instructions Some Some Some Entire Entire Entire Some Entire Entire Multiply instructions 32x32 = 32-bit result Yes Yes Yes Yes Yes Yes Yes Yes Yes Multiply instructions 32x32 = 64-bit result No No No Yes Yes Yes No Yes Yes Divide instructions 32/32 = 32-bit quotient No No No Yes Yes Yes Yes Yes Yes Saturated instructions No No No Some Yes Yes No Yes Yes DSP instructions No No No No Yes Yes No Optional Optional Interrupt latency (if zero-wait state RAM) 16 cycles 15 cycles 23 for NMI 26 for IRQ 12 cycles 12 cycles 12 cycles 15 no security ext 27 security ext TBD TBD
  • 6. ARM Cortex-M Von Neumann (Princeton) Harvard
  • 7. ARM Cortex-M Instruction pipeline •IF — Instruction Fetch, •ID — Instruction Decode, •EX — Execute, •MEM — Memory access, •WB — Register write back.
  • 8. ARM Cortex-M Instruction pipeline Pipeline states: 1. Fetch 2. Decode 3. Execute 4. Write-back
  • 9. ARM Cortex-M Instruction pipeline Pipeline states: 1. Fetch 2. Decode 3. Execute 4. Write-back
  • 10. ARM Cortex-M Processor registers The processor has the following 32-bit registers: • 13 general-purpose registers, r0-r12 • Stack Pointer (SP) alias of banked registers, SP_process and SP_main • Link Register (LR), r14 • Program Counter (PC), r15 • Special-purpose Program Status Registers, (xPSR).
  • 16. ARM Cortex-M – STM32 Power
  • 18. General-purpose I/O Main features • Up to 16 I/Os under control • Output states: push-pull or open drain + pull-up/down • Output data from output data register (GPIOx_ODR) • Speed selection for each I/O • Input states: floating, pull-up/down, analog • Input data to input data register (GPIOx_IDR) • Bit set and reset register (GPIOx_BSRR) for bitwise write access to GPIOx_ODR • Locking mechanism (GPIOx_LCKR) provided to freeze the I/O configuration • Analog function • Alternate function input/output selection registers (at most 16 AFs per I/O) • Fast toggle capable of changing every two clock cycles • Highly flexible pin multiplexing allows the use of I/O pins as GPIOs or as one of several peripheral functions
  • 23. General-purpose I/O Selecting an alternate function Port AF0 SYS AF1 TIM1/2 Afn … PORTA PA0 - TIM2_CH1/ TIM2_ETR … PA1 - TIM2_CH2 … PAn - TIM2_CH3 … … … … … …
  • 25. ARM Cortex-M Example. Work with registers button = *((uint32_t *)(0x40000000U + 0x00020000 + 0x10)) & 0x1; button = GPIOA->IDR & GPIO_IDR_ID0; Task 1. Read button state • PERIPH_BASE = 0x40000000 • AHB1_BASE = PERIPH_BASE + 0x00020000 • GPIOA_BASE = AHB1_BASE + 0x0000 • Input Data Reg = 0x10
  • 26. ARM Cortex-M Example. Work with registers *((uint32_t *)(0x40000000 + 0x00020000 + 0x0C00 + 0x14)) = *((uint32_t *)(0x40000000 + 0x00020000 + 0x0C00 + 0x14)) | 0x1000; GPIOD->ODR = GPIOD->ODR | GPIO_ODR_OD12; <=> GPIO->ODR |= 1 << 12; Task 2. Turn led On • PERIPH_BASE = 0x40000000 • AHB1_BASE = PERIPH_BASE + 0x00020000 • GPIOD_BASE = AHB1_BASE + 0x0C00 • Output Data Reg = 0x14 Read -> Modify -> Write
  • 27. ARM Cortex-M Bit Banding Address in the bit band alias region = Bit band alias base address + bit word offset Where bit word offset = Byte offset from bit band base X32 + bit number X4 • PERIPH_BASE = 0x40000000 (PER_Base) • GPIOD->ODR = 0x40020C14 (WORD) • Bit Band Alias base = 0x42000000 (BBA_Base) • PIN = 12 • BIT = BBA_Base + (WORD – PER_Base)*32 + PIN*4; Byte offset from bit band base Bit number
  • 28. Thank you for your attention www.ifmo.ru