SlideShare a Scribd company logo
1 of 38
ARM Training
CortexM3 Subsystem
Date – 28/03/2012
raghav.nayak@st.com
2
Agenda
 CortexM3 Subsystem
 Peripherals
 SW Development
 Debugging
 Tool Demo
CortexM3 Processor
 CortexM3 Core
 Nested Vector Interrupt Controller
 Bus Interface
 Debug Access Port
 Memory Protection Unit
 ETM, ITM and TPIU
 WIC
 Flash Patch Breakpoint
 Data Watchpoint and Trace
 ROM Table
3
Garnet Implementation
4
5
CortexM3 Core
 ARM v7M Architecture
 Harvard Architecture
 3 stage pipeline
 Thumb and Thumb-2
Instruction set
 Low latency interrupt
handling
 Speculative Branch
Prediction
 Single cycle multiplication
 H/W division support
 Unaligned access
 Big Endian support
Modes and States
 Execution State
 Thumb
 Debug
 Execution Mode
 Thread
 Handler
 Resource Access
 Privileged
 User or Unprivileged
6
Data Types and Registers
 Data Type Support
 Byte, Half-Word and Word
 32 bit pointer
 Signed or unsigned Byte, Half-Word, Word and
Double word
 Registers
 16 32-bit register
 R0-R12 general purpose register, SP, LR and PC
 Banked Stack Pointer (Main and Process)
 3 Program Status Register
 3 Mask Register
 1 Control Register – 3 bit to select access/stack
7
Registers …cont…
8
Registers …cont…
 Program Status Register (PSR)
 Application PSR
 N, C, Z, V, Q and GE[3-0] Condition flags
 Interrupt PSR
 Holds the exception number of the currently executed
exception
 Execution PSR
 T and ICI/IT bit fields
9
Registers …cont…
10
 Mask Register
 PRIMASK
 1-bit Register
 changes the execution priority to 0(Highest Priority)
 FAULTMASK
 1-bit Register
 Changes the execution priority to -1(Hard Fault)
 BASEPRI
 8-bit Register
 Changes the priority level required for preemption
Instruction Set
11
 Unified Assembly Language Syntax
 16 bit or 32 bit Instructions
 Data Processing
 MOV, ASR, LSL, ROR, ADD, SUB, REV, MUL, UDIV, CMP,
TST, CMN, AND, ORR, BIC, BFI, EOR, CPY
 Process control
 B, BX, BL, CBNZ, CBZ
 Load/Store
 LDR, STR, LDRH, STRH, LDRB, STRB, LDRD, STRD, LDM,
STM, LDREX, STREX
 Serial/Miscellaneous
 DMB, DSB, ISB, WFI, WFE, MRS, MSR, CPS, SEV, CLREX,
SVC
Exception
 Synchronous or Asynchronous events
 External or System events
 Reset, Supervisor Call, Fault or Interrupt
 Preempting exception
 Active, Pending, Active-Pending or Inactive state
 Programmable priority
 Except Reset = -3, NMI = -2 and HardFault = -1
 Stack context supports AAPCS
 Exception handler should be AAPCS compliant
12
Exception …cont…
 Entry Behavior
 Stack Alignment correction
 Hardware saves context state to stack
 Exit Behavior
 POP/LDM, LDR or BX loads 0xFxxxxxxx into PC
 Hardware restores context state from stack
 Revert Stack alignment correction
13
Exception …cont…
14
 Vector is fetched in parallel to stack activity
 R0-R3, R12, xPSR, LR and PC stored and
restored by hardware
 12 cycle latency PUSH/POP
Exception …cont…
 Tail Chaining Exception
 Optimized exception entry and exit sequence
 Six clock cycle for zero wait state memory
 No stack PUSH and POP operation
15
Exception …cont…
 Late arriving exception
 High priority exception handling during exception entry
sequence
 Optimized exception entry and exit sequence
16
Fault
17
 MemManage
 Generated by MPU
 instruction or data memory access
 BusFault
 Memory access failures due to error in Bus Activity
 Instruction and data transaction
 HardFault
 Generic fault used for escalation
 UsageFault
 Non-memory related events caused by instruction
 Undefined instruction, invalid state, exception return
Bit Banding
 enable direct access to single bit of data
 32MB alias region mapped to 1MB bit band
region
 Memory access is atomic
18
Nested Vector Interrupt Controller
 32 external interrupts and 5-bit priority level
 Reduced interrupt latency
 Supports nesting interrupt
 Supports dynamic priority
 Controls power management scheme
 Supports both level and edge triggered interrupt
 Privileged access
 Little endian register access
 Supports Non Maskable Interrupt (NMI)
 Provides 24-bit down timer (SysTick)
19
Bus Interface
 32-bit AMBA3 AHB Lite Port
 ICode Interface
 Instruction fetch from memory range 0x0-0x1FFFFFFF
 No debug access
 DCode Interface
 Data and debug access on memory range 0x0-0x1FFFFFFF
 System Interface
 Instruction, Data and debug access on memory range
0x20000000-0xDFFFFFFF and 0xE0100000-0xFFFFFFFF
 32-bit AMBA3 APB port
 Private Peripheral Bus
 Data and debug access on memory range 0xE0000000-
0xE00FFFFF
20
System Memory Map
21
System Control Space
 32 bit registers in 4KB address space
 CPUID and vendor Identification
 Fault detection and handling
 Interrupt configuration, detection and handling
 Exception priority control
 Sleep Mode handling
 Debug control and status
22
Debug
 Invasive debug
 2 hardware and 6 software breakpoint
 Based on CoreSight debug architecture
 Serial Wire and JTAG Debug Port
 FPB supports halt, single step execution
 AHB-AP provides access to memory and
registers in the system
 Target Identification
 Read the CPUID register from System Control Space
in ROM table
 Breakpoint information from FPB in ROM table
23
Peripherals
 DMA
 8 channels, 16 requests through 16 line
 2 Master and 1 Slave port
 2 interrupt request line
 Single and Burst request with burst length 1024 bytes
 Flow control and big endian support
 UART
 Max 460800 and Min 110 baud
 Programmable baud rate, stop bit, parity bit, FIFO
trigger level, flow control
 32X8 transmit and 32X12 receive FIFO
 DMA and Interrupt support
24
Peripherals …cont…
 Dual Timer
 2 configurable 32 or 16 bit down counters
 Free running, periodic or one-shot
 Programmable 1, 16 or 256 pre-scalar values
 Runs at Core clock
 interrupt signaling on zero count
 Watchdog
 32 bit down counter
 Enabled or disabled by software
 Reset the system to recover from software failure
 Provides mechanism to avoid unauthorise access
 Runs at Core clock
25
MDK-ARM Tool
26
uVision4 IDE
 Source code editor
 Device database
 Project Manager
 Integrated Make utility
 Dialogs for
Environment Setting
 Target CPU Simulator
 Flash Program Utility
 Debug using ULINK
Debug Adapter
27
Software Development Cycle
 Create a new Project
 Configure device database and tool setting
 Create new source files and add to the project
 Build the project
 Fix build errors
 Optimize application
 Download image to Flash ROM or SRAM
 Execute the application
28
ULINK2 Pro
 Provides interfaces
 JTAG to target board
 USB to Host PC
 Supports
 Checking memory and
registers
 Breakpoints and single
step execution
 Image download and
execution in real-time
 Program memory flash
29
Coding Hint
 Speed optimization
 Size optimization
 Power optimization
 MicroLIB to reduce code size
 Use 32 bit variables for local and parameters
 Place scalars at the beginning of a struct variable
30
Startup code
31
Startup code ..cont…
32
Scatter file
33
Build Mode
34
Debug Mode
35
IP Validation
 Stand alone validation
 Independent of OS
 Independent of Flash/ROM code
 CPU Startup and Interrupt Initialization code
 Scatter file for flexible code execution
 No additional latency due to OS
 Single test or All test execution
36
Questions?
37
Reference
 Garnet Architecture specification
 ARMv7-M architecture reference manual
 CortexM3 Technical reference manual
38
10.201.59.94specs

More Related Content

What's hot

Amba axi 29 3_2015
Amba axi 29 3_2015Amba axi 29 3_2015
Amba axi 29 3_2015kiemnhatminh
 
INTERRUPTS OF 8086 MICROPROCESSOR
INTERRUPTS OF 8086 MICROPROCESSORINTERRUPTS OF 8086 MICROPROCESSOR
INTERRUPTS OF 8086 MICROPROCESSORGurudev joshi
 
Message Signaled Interrupts
Message Signaled InterruptsMessage Signaled Interrupts
Message Signaled InterruptsAnshuman Biswal
 
ARM - Advance RISC Machine
ARM - Advance RISC MachineARM - Advance RISC Machine
ARM - Advance RISC MachineEdutechLearners
 
ARM architcture
ARM architcture ARM architcture
ARM architcture Hossam Adel
 
8051 MICROCONTROLLER ARCHITECTURE.pptx
 8051 MICROCONTROLLER ARCHITECTURE.pptx 8051 MICROCONTROLLER ARCHITECTURE.pptx
8051 MICROCONTROLLER ARCHITECTURE.pptxMemonaMemon1
 
ARM Exception and interrupts
ARM Exception and interrupts ARM Exception and interrupts
ARM Exception and interrupts NishmaNJ
 
Microcontroller pic 16f877 addressing modes instructions and programming
Microcontroller pic 16f877 addressing modes instructions and programmingMicrocontroller pic 16f877 addressing modes instructions and programming
Microcontroller pic 16f877 addressing modes instructions and programmingNilesh Bhaskarrao Bahadure
 
Verification Strategy for PCI-Express
Verification Strategy for PCI-ExpressVerification Strategy for PCI-Express
Verification Strategy for PCI-ExpressDVClub
 
Introduction to arm architecture
Introduction to arm architectureIntroduction to arm architecture
Introduction to arm architectureZakaria Gomaa
 
Pic microcontroller architecture
Pic microcontroller architecturePic microcontroller architecture
Pic microcontroller architectureDominicHendry
 
Overview of LPC214x MCUs
Overview of LPC214x MCUsOverview of LPC214x MCUs
Overview of LPC214x MCUsPremier Farnell
 
Part-1 : Mastering microcontroller with embedded driver development
Part-1 : Mastering microcontroller with embedded driver development Part-1 : Mastering microcontroller with embedded driver development
Part-1 : Mastering microcontroller with embedded driver development FastBit Embedded Brain Academy
 

What's hot (20)

Amba axi 29 3_2015
Amba axi 29 3_2015Amba axi 29 3_2015
Amba axi 29 3_2015
 
INTERRUPTS OF 8086 MICROPROCESSOR
INTERRUPTS OF 8086 MICROPROCESSORINTERRUPTS OF 8086 MICROPROCESSOR
INTERRUPTS OF 8086 MICROPROCESSOR
 
Message Signaled Interrupts
Message Signaled InterruptsMessage Signaled Interrupts
Message Signaled Interrupts
 
ARM - Advance RISC Machine
ARM - Advance RISC MachineARM - Advance RISC Machine
ARM - Advance RISC Machine
 
I2C Protocol
I2C ProtocolI2C Protocol
I2C Protocol
 
ARM architcture
ARM architcture ARM architcture
ARM architcture
 
STM32 Microcontroller Clocks and RCC block
STM32 Microcontroller Clocks and RCC blockSTM32 Microcontroller Clocks and RCC block
STM32 Microcontroller Clocks and RCC block
 
ARM Processor
ARM ProcessorARM Processor
ARM Processor
 
8051 MICROCONTROLLER ARCHITECTURE.pptx
 8051 MICROCONTROLLER ARCHITECTURE.pptx 8051 MICROCONTROLLER ARCHITECTURE.pptx
8051 MICROCONTROLLER ARCHITECTURE.pptx
 
ARM Exception and interrupts
ARM Exception and interrupts ARM Exception and interrupts
ARM Exception and interrupts
 
Microcontroller pic 16f877 addressing modes instructions and programming
Microcontroller pic 16f877 addressing modes instructions and programmingMicrocontroller pic 16f877 addressing modes instructions and programming
Microcontroller pic 16f877 addressing modes instructions and programming
 
axi protocol
axi protocolaxi protocol
axi protocol
 
Verification Strategy for PCI-Express
Verification Strategy for PCI-ExpressVerification Strategy for PCI-Express
Verification Strategy for PCI-Express
 
Introduction to arm architecture
Introduction to arm architectureIntroduction to arm architecture
Introduction to arm architecture
 
Pic microcontroller architecture
Pic microcontroller architecturePic microcontroller architecture
Pic microcontroller architecture
 
Axi protocol
Axi protocolAxi protocol
Axi protocol
 
Advance Peripheral Bus
Advance Peripheral Bus Advance Peripheral Bus
Advance Peripheral Bus
 
Overview of LPC214x MCUs
Overview of LPC214x MCUsOverview of LPC214x MCUs
Overview of LPC214x MCUs
 
Part-1 : Mastering microcontroller with embedded driver development
Part-1 : Mastering microcontroller with embedded driver development Part-1 : Mastering microcontroller with embedded driver development
Part-1 : Mastering microcontroller with embedded driver development
 
Arm instruction set
Arm instruction setArm instruction set
Arm instruction set
 

Viewers also liked

Power the world with mbed LPC1768
Power the world with mbed LPC1768Power the world with mbed LPC1768
Power the world with mbed LPC1768yoonghm
 
SPEED CONTROL OF INDUCTION MACHINE WITH REDUCTION IN TORQUE RIPPLE USING ROBU...
SPEED CONTROL OF INDUCTION MACHINE WITH REDUCTION IN TORQUE RIPPLE USING ROBU...SPEED CONTROL OF INDUCTION MACHINE WITH REDUCTION IN TORQUE RIPPLE USING ROBU...
SPEED CONTROL OF INDUCTION MACHINE WITH REDUCTION IN TORQUE RIPPLE USING ROBU...IAEME Publication
 
Up and running with Teensy 3.1
Up and running with Teensy 3.1Up and running with Teensy 3.1
Up and running with Teensy 3.1yoonghm
 
Introduction to the extended essay for supervisors
Introduction to the extended essay for supervisorsIntroduction to the extended essay for supervisors
Introduction to the extended essay for supervisorslindatw
 
STM32 F4 (PWM,SPI And ADC Test Examples)
STM32 F4 (PWM,SPI And ADC Test Examples)STM32 F4 (PWM,SPI And ADC Test Examples)
STM32 F4 (PWM,SPI And ADC Test Examples)Aymen Lachkhem
 
Single Phase PWM Rectifier In Traction Application
Single Phase PWM Rectifier In Traction ApplicationSingle Phase PWM Rectifier In Traction Application
Single Phase PWM Rectifier In Traction ApplicationShubhamesh Patne
 
Deploy mbed IoT cloud
Deploy mbed IoT cloudDeploy mbed IoT cloud
Deploy mbed IoT cloud艾鍗科技
 
A Comparative Analysis Among PWM Control Z-source Inverter with Conventional ...
A Comparative Analysis Among PWM Control Z-source Inverter with Conventional ...A Comparative Analysis Among PWM Control Z-source Inverter with Conventional ...
A Comparative Analysis Among PWM Control Z-source Inverter with Conventional ...Mustafa Xaved
 
Matrix Converter based Direct Torque Control of Induction Motor
Matrix Converter based Direct Torque Control of Induction MotorMatrix Converter based Direct Torque Control of Induction Motor
Matrix Converter based Direct Torque Control of Induction MotorNeehar NLN
 
Simulation of sinosoidal pulse width modulation
Simulation of sinosoidal pulse width modulationSimulation of sinosoidal pulse width modulation
Simulation of sinosoidal pulse width modulationTanzeel Ahmad
 
Brochure postgraduate 2017
Brochure postgraduate 2017Brochure postgraduate 2017
Brochure postgraduate 2017CHEMIN D'ELITES
 
Dc motor speed controller by pwm technique
Dc motor speed controller by pwm techniqueDc motor speed controller by pwm technique
Dc motor speed controller by pwm techniqueWeb Design & Development
 
AVR_Course_Day8 motor drive and pwm techniques
AVR_Course_Day8 motor drive and pwm techniquesAVR_Course_Day8 motor drive and pwm techniques
AVR_Course_Day8 motor drive and pwm techniquesMohamed Ali
 
DIRECT TORQUE CONTROL OF THREE PHASE INDUCTION MOTOR USING FOUR SWITCH THREE ...
DIRECT TORQUE CONTROL OF THREE PHASE INDUCTION MOTOR USING FOUR SWITCH THREE ...DIRECT TORQUE CONTROL OF THREE PHASE INDUCTION MOTOR USING FOUR SWITCH THREE ...
DIRECT TORQUE CONTROL OF THREE PHASE INDUCTION MOTOR USING FOUR SWITCH THREE ...smadhumitha
 

Viewers also liked (20)

Lpc1768
Lpc1768Lpc1768
Lpc1768
 
Power the world with mbed LPC1768
Power the world with mbed LPC1768Power the world with mbed LPC1768
Power the world with mbed LPC1768
 
Embedded systems basics
Embedded systems basicsEmbedded systems basics
Embedded systems basics
 
SPEED CONTROL OF INDUCTION MACHINE WITH REDUCTION IN TORQUE RIPPLE USING ROBU...
SPEED CONTROL OF INDUCTION MACHINE WITH REDUCTION IN TORQUE RIPPLE USING ROBU...SPEED CONTROL OF INDUCTION MACHINE WITH REDUCTION IN TORQUE RIPPLE USING ROBU...
SPEED CONTROL OF INDUCTION MACHINE WITH REDUCTION IN TORQUE RIPPLE USING ROBU...
 
Up and running with Teensy 3.1
Up and running with Teensy 3.1Up and running with Teensy 3.1
Up and running with Teensy 3.1
 
5 geo 2º bim
5 geo 2º bim5 geo 2º bim
5 geo 2º bim
 
Introduction to the extended essay for supervisors
Introduction to the extended essay for supervisorsIntroduction to the extended essay for supervisors
Introduction to the extended essay for supervisors
 
STM32 F4 (PWM,SPI And ADC Test Examples)
STM32 F4 (PWM,SPI And ADC Test Examples)STM32 F4 (PWM,SPI And ADC Test Examples)
STM32 F4 (PWM,SPI And ADC Test Examples)
 
présentation STM32
présentation STM32présentation STM32
présentation STM32
 
Design Report
Design ReportDesign Report
Design Report
 
Single Phase PWM Rectifier In Traction Application
Single Phase PWM Rectifier In Traction ApplicationSingle Phase PWM Rectifier In Traction Application
Single Phase PWM Rectifier In Traction Application
 
Deploy mbed IoT cloud
Deploy mbed IoT cloudDeploy mbed IoT cloud
Deploy mbed IoT cloud
 
A Comparative Analysis Among PWM Control Z-source Inverter with Conventional ...
A Comparative Analysis Among PWM Control Z-source Inverter with Conventional ...A Comparative Analysis Among PWM Control Z-source Inverter with Conventional ...
A Comparative Analysis Among PWM Control Z-source Inverter with Conventional ...
 
Matrix Converter based Direct Torque Control of Induction Motor
Matrix Converter based Direct Torque Control of Induction MotorMatrix Converter based Direct Torque Control of Induction Motor
Matrix Converter based Direct Torque Control of Induction Motor
 
Direct Torque Control of Matrix Converter fed BLDC motor
Direct Torque Control of Matrix Converter fed BLDC motorDirect Torque Control of Matrix Converter fed BLDC motor
Direct Torque Control of Matrix Converter fed BLDC motor
 
Simulation of sinosoidal pulse width modulation
Simulation of sinosoidal pulse width modulationSimulation of sinosoidal pulse width modulation
Simulation of sinosoidal pulse width modulation
 
Brochure postgraduate 2017
Brochure postgraduate 2017Brochure postgraduate 2017
Brochure postgraduate 2017
 
Dc motor speed controller by pwm technique
Dc motor speed controller by pwm techniqueDc motor speed controller by pwm technique
Dc motor speed controller by pwm technique
 
AVR_Course_Day8 motor drive and pwm techniques
AVR_Course_Day8 motor drive and pwm techniquesAVR_Course_Day8 motor drive and pwm techniques
AVR_Course_Day8 motor drive and pwm techniques
 
DIRECT TORQUE CONTROL OF THREE PHASE INDUCTION MOTOR USING FOUR SWITCH THREE ...
DIRECT TORQUE CONTROL OF THREE PHASE INDUCTION MOTOR USING FOUR SWITCH THREE ...DIRECT TORQUE CONTROL OF THREE PHASE INDUCTION MOTOR USING FOUR SWITCH THREE ...
DIRECT TORQUE CONTROL OF THREE PHASE INDUCTION MOTOR USING FOUR SWITCH THREE ...
 

Similar to ARM Cortex-M3 Training

PIC32MX Microcontroller Family
PIC32MX Microcontroller FamilyPIC32MX Microcontroller Family
PIC32MX Microcontroller FamilyPremier Farnell
 
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_armPrashant Ahire
 
Overview Study on PIC32MX3XX / 4XX 32-Bit Controller
Overview Study on PIC32MX3XX / 4XX 32-Bit ControllerOverview Study on PIC32MX3XX / 4XX 32-Bit Controller
Overview Study on PIC32MX3XX / 4XX 32-Bit ControllerPremier Farnell
 
computer architecture
computer architecture computer architecture
computer architecture Dr.Umadevi V
 
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 214XKarthik Vivek
 
Introduction to i.MX27 Multimedia Applications Processors
Introduction to i.MX27 Multimedia Applications ProcessorsIntroduction to i.MX27 Multimedia Applications Processors
Introduction to i.MX27 Multimedia Applications ProcessorsPremier Farnell
 
PIC32MX5XX/6XX/7XX USB, CAN and Ethernet 32-Bit Flash Microcontrollers
PIC32MX5XX/6XX/7XX USB, CAN and Ethernet 32-Bit Flash MicrocontrollersPIC32MX5XX/6XX/7XX USB, CAN and Ethernet 32-Bit Flash Microcontrollers
PIC32MX5XX/6XX/7XX USB, CAN and Ethernet 32-Bit Flash MicrocontrollersPremier Farnell
 
soc ip core based for spacecraft application
soc ip core based for spacecraft applicationsoc ip core based for spacecraft application
soc ip core based for spacecraft applicationnavyashree pari
 
MCF5223x: Integrated ColdFire V2 Ethernet Microcontrollers
MCF5223x: Integrated ColdFire V2 Ethernet MicrocontrollersMCF5223x: Integrated ColdFire V2 Ethernet Microcontrollers
MCF5223x: Integrated ColdFire V2 Ethernet MicrocontrollersPremier Farnell
 
Chp1 68000 microprocessor copy
Chp1 68000 microprocessor   copyChp1 68000 microprocessor   copy
Chp1 68000 microprocessor copymkazree
 
Intel x86 Architecture
Intel x86 ArchitectureIntel x86 Architecture
Intel x86 ArchitectureChangWoo Min
 
Arm architecture
Arm architectureArm architecture
Arm architectureMinYeop Na
 
Introducing OMAP-L138/AM1808 Processor Architecture and Hawkboard Peripherals
Introducing OMAP-L138/AM1808 Processor Architecture and Hawkboard PeripheralsIntroducing OMAP-L138/AM1808 Processor Architecture and Hawkboard Peripherals
Introducing OMAP-L138/AM1808 Processor Architecture and Hawkboard PeripheralsPremier Farnell
 
Study on 32-bit Cortex - M3 Powered MCU: STM32F101
Study on 32-bit Cortex - M3 Powered MCU: STM32F101Study on 32-bit Cortex - M3 Powered MCU: STM32F101
Study on 32-bit Cortex - M3 Powered MCU: STM32F101Premier Farnell
 
03 Mcu Day 2009 (C2000) 8 13 Editado
03   Mcu Day 2009 (C2000) 8 13   Editado03   Mcu Day 2009 (C2000) 8 13   Editado
03 Mcu Day 2009 (C2000) 8 13 EditadoTexas Instruments
 
Q4.11: ARM Architecture
Q4.11: ARM ArchitectureQ4.11: ARM Architecture
Q4.11: ARM ArchitectureLinaro
 
MPC854XE: PowerQUICC III Processors
MPC854XE: PowerQUICC III ProcessorsMPC854XE: PowerQUICC III Processors
MPC854XE: PowerQUICC III ProcessorsPremier Farnell
 

Similar to ARM Cortex-M3 Training (20)

PIC32MX Microcontroller Family
PIC32MX Microcontroller FamilyPIC32MX Microcontroller Family
PIC32MX Microcontroller Family
 
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
 
Overview Study on PIC32MX3XX / 4XX 32-Bit Controller
Overview Study on PIC32MX3XX / 4XX 32-Bit ControllerOverview Study on PIC32MX3XX / 4XX 32-Bit Controller
Overview Study on PIC32MX3XX / 4XX 32-Bit Controller
 
STM32 MCU Family
STM32 MCU FamilySTM32 MCU Family
STM32 MCU Family
 
computer architecture
computer architecture computer architecture
computer architecture
 
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
 
Introduction to i.MX27 Multimedia Applications Processors
Introduction to i.MX27 Multimedia Applications ProcessorsIntroduction to i.MX27 Multimedia Applications Processors
Introduction to i.MX27 Multimedia Applications Processors
 
PIC32MX5XX/6XX/7XX USB, CAN and Ethernet 32-Bit Flash Microcontrollers
PIC32MX5XX/6XX/7XX USB, CAN and Ethernet 32-Bit Flash MicrocontrollersPIC32MX5XX/6XX/7XX USB, CAN and Ethernet 32-Bit Flash Microcontrollers
PIC32MX5XX/6XX/7XX USB, CAN and Ethernet 32-Bit Flash Microcontrollers
 
soc ip core based for spacecraft application
soc ip core based for spacecraft applicationsoc ip core based for spacecraft application
soc ip core based for spacecraft application
 
MCF5223x: Integrated ColdFire V2 Ethernet Microcontrollers
MCF5223x: Integrated ColdFire V2 Ethernet MicrocontrollersMCF5223x: Integrated ColdFire V2 Ethernet Microcontrollers
MCF5223x: Integrated ColdFire V2 Ethernet Microcontrollers
 
Lec02
Lec02Lec02
Lec02
 
Chp1 68000 microprocessor copy
Chp1 68000 microprocessor   copyChp1 68000 microprocessor   copy
Chp1 68000 microprocessor copy
 
Intel x86 Architecture
Intel x86 ArchitectureIntel x86 Architecture
Intel x86 Architecture
 
Arm architecture
Arm architectureArm architecture
Arm architecture
 
Introducing OMAP-L138/AM1808 Processor Architecture and Hawkboard Peripherals
Introducing OMAP-L138/AM1808 Processor Architecture and Hawkboard PeripheralsIntroducing OMAP-L138/AM1808 Processor Architecture and Hawkboard Peripherals
Introducing OMAP-L138/AM1808 Processor Architecture and Hawkboard Peripherals
 
x86_1.ppt
x86_1.pptx86_1.ppt
x86_1.ppt
 
Study on 32-bit Cortex - M3 Powered MCU: STM32F101
Study on 32-bit Cortex - M3 Powered MCU: STM32F101Study on 32-bit Cortex - M3 Powered MCU: STM32F101
Study on 32-bit Cortex - M3 Powered MCU: STM32F101
 
03 Mcu Day 2009 (C2000) 8 13 Editado
03   Mcu Day 2009 (C2000) 8 13   Editado03   Mcu Day 2009 (C2000) 8 13   Editado
03 Mcu Day 2009 (C2000) 8 13 Editado
 
Q4.11: ARM Architecture
Q4.11: ARM ArchitectureQ4.11: ARM Architecture
Q4.11: ARM Architecture
 
MPC854XE: PowerQUICC III Processors
MPC854XE: PowerQUICC III ProcessorsMPC854XE: PowerQUICC III Processors
MPC854XE: PowerQUICC III Processors
 

Recently uploaded

High Profile Call Girls Nagpur Isha Call 7001035870 Meet With Nagpur Escorts
High Profile Call Girls Nagpur Isha Call 7001035870 Meet With Nagpur EscortsHigh Profile Call Girls Nagpur Isha Call 7001035870 Meet With Nagpur Escorts
High Profile Call Girls Nagpur Isha Call 7001035870 Meet With Nagpur Escortsranjana rawat
 
MANUFACTURING PROCESS-II UNIT-2 LATHE MACHINE
MANUFACTURING PROCESS-II UNIT-2 LATHE MACHINEMANUFACTURING PROCESS-II UNIT-2 LATHE MACHINE
MANUFACTURING PROCESS-II UNIT-2 LATHE MACHINESIVASHANKAR N
 
OSVC_Meta-Data based Simulation Automation to overcome Verification Challenge...
OSVC_Meta-Data based Simulation Automation to overcome Verification Challenge...OSVC_Meta-Data based Simulation Automation to overcome Verification Challenge...
OSVC_Meta-Data based Simulation Automation to overcome Verification Challenge...Soham Mondal
 
What are the advantages and disadvantages of membrane structures.pptx
What are the advantages and disadvantages of membrane structures.pptxWhat are the advantages and disadvantages of membrane structures.pptx
What are the advantages and disadvantages of membrane structures.pptxwendy cai
 
The Most Attractive Pune Call Girls Budhwar Peth 8250192130 Will You Miss Thi...
The Most Attractive Pune Call Girls Budhwar Peth 8250192130 Will You Miss Thi...The Most Attractive Pune Call Girls Budhwar Peth 8250192130 Will You Miss Thi...
The Most Attractive Pune Call Girls Budhwar Peth 8250192130 Will You Miss Thi...ranjana rawat
 
SPICE PARK APR2024 ( 6,793 SPICE Models )
SPICE PARK APR2024 ( 6,793 SPICE Models )SPICE PARK APR2024 ( 6,793 SPICE Models )
SPICE PARK APR2024 ( 6,793 SPICE Models )Tsuyoshi Horigome
 
HARDNESS, FRACTURE TOUGHNESS AND STRENGTH OF CERAMICS
HARDNESS, FRACTURE TOUGHNESS AND STRENGTH OF CERAMICSHARDNESS, FRACTURE TOUGHNESS AND STRENGTH OF CERAMICS
HARDNESS, FRACTURE TOUGHNESS AND STRENGTH OF CERAMICSRajkumarAkumalla
 
HARMONY IN THE NATURE AND EXISTENCE - Unit-IV
HARMONY IN THE NATURE AND EXISTENCE - Unit-IVHARMONY IN THE NATURE AND EXISTENCE - Unit-IV
HARMONY IN THE NATURE AND EXISTENCE - Unit-IVRajaP95
 
Analog to Digital and Digital to Analog Converter
Analog to Digital and Digital to Analog ConverterAnalog to Digital and Digital to Analog Converter
Analog to Digital and Digital to Analog ConverterAbhinavSharma374939
 
Model Call Girl in Narela Delhi reach out to us at 🔝8264348440🔝
Model Call Girl in Narela Delhi reach out to us at 🔝8264348440🔝Model Call Girl in Narela Delhi reach out to us at 🔝8264348440🔝
Model Call Girl in Narela Delhi reach out to us at 🔝8264348440🔝soniya singh
 
Call Girls Service Nagpur Tanvi Call 7001035870 Meet With Nagpur Escorts
Call Girls Service Nagpur Tanvi Call 7001035870 Meet With Nagpur EscortsCall Girls Service Nagpur Tanvi Call 7001035870 Meet With Nagpur Escorts
Call Girls Service Nagpur Tanvi Call 7001035870 Meet With Nagpur EscortsCall Girls in Nagpur High Profile
 
VIP Call Girls Service Hitech City Hyderabad Call +91-8250192130
VIP Call Girls Service Hitech City Hyderabad Call +91-8250192130VIP Call Girls Service Hitech City Hyderabad Call +91-8250192130
VIP Call Girls Service Hitech City Hyderabad Call +91-8250192130Suhani Kapoor
 
(ANVI) Koregaon Park Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...
(ANVI) Koregaon Park Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...(ANVI) Koregaon Park Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...
(ANVI) Koregaon Park Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...ranjana rawat
 
(PRIYA) Rajgurunagar Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...
(PRIYA) Rajgurunagar Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...(PRIYA) Rajgurunagar Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...
(PRIYA) Rajgurunagar Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...ranjana rawat
 
Introduction to Multiple Access Protocol.pptx
Introduction to Multiple Access Protocol.pptxIntroduction to Multiple Access Protocol.pptx
Introduction to Multiple Access Protocol.pptxupamatechverse
 
APPLICATIONS-AC/DC DRIVES-OPERATING CHARACTERISTICS
APPLICATIONS-AC/DC DRIVES-OPERATING CHARACTERISTICSAPPLICATIONS-AC/DC DRIVES-OPERATING CHARACTERISTICS
APPLICATIONS-AC/DC DRIVES-OPERATING CHARACTERISTICSKurinjimalarL3
 
Introduction and different types of Ethernet.pptx
Introduction and different types of Ethernet.pptxIntroduction and different types of Ethernet.pptx
Introduction and different types of Ethernet.pptxupamatechverse
 

Recently uploaded (20)

DJARUM4D - SLOT GACOR ONLINE | SLOT DEMO ONLINE
DJARUM4D - SLOT GACOR ONLINE | SLOT DEMO ONLINEDJARUM4D - SLOT GACOR ONLINE | SLOT DEMO ONLINE
DJARUM4D - SLOT GACOR ONLINE | SLOT DEMO ONLINE
 
High Profile Call Girls Nagpur Isha Call 7001035870 Meet With Nagpur Escorts
High Profile Call Girls Nagpur Isha Call 7001035870 Meet With Nagpur EscortsHigh Profile Call Girls Nagpur Isha Call 7001035870 Meet With Nagpur Escorts
High Profile Call Girls Nagpur Isha Call 7001035870 Meet With Nagpur Escorts
 
MANUFACTURING PROCESS-II UNIT-2 LATHE MACHINE
MANUFACTURING PROCESS-II UNIT-2 LATHE MACHINEMANUFACTURING PROCESS-II UNIT-2 LATHE MACHINE
MANUFACTURING PROCESS-II UNIT-2 LATHE MACHINE
 
OSVC_Meta-Data based Simulation Automation to overcome Verification Challenge...
OSVC_Meta-Data based Simulation Automation to overcome Verification Challenge...OSVC_Meta-Data based Simulation Automation to overcome Verification Challenge...
OSVC_Meta-Data based Simulation Automation to overcome Verification Challenge...
 
What are the advantages and disadvantages of membrane structures.pptx
What are the advantages and disadvantages of membrane structures.pptxWhat are the advantages and disadvantages of membrane structures.pptx
What are the advantages and disadvantages of membrane structures.pptx
 
The Most Attractive Pune Call Girls Budhwar Peth 8250192130 Will You Miss Thi...
The Most Attractive Pune Call Girls Budhwar Peth 8250192130 Will You Miss Thi...The Most Attractive Pune Call Girls Budhwar Peth 8250192130 Will You Miss Thi...
The Most Attractive Pune Call Girls Budhwar Peth 8250192130 Will You Miss Thi...
 
SPICE PARK APR2024 ( 6,793 SPICE Models )
SPICE PARK APR2024 ( 6,793 SPICE Models )SPICE PARK APR2024 ( 6,793 SPICE Models )
SPICE PARK APR2024 ( 6,793 SPICE Models )
 
HARDNESS, FRACTURE TOUGHNESS AND STRENGTH OF CERAMICS
HARDNESS, FRACTURE TOUGHNESS AND STRENGTH OF CERAMICSHARDNESS, FRACTURE TOUGHNESS AND STRENGTH OF CERAMICS
HARDNESS, FRACTURE TOUGHNESS AND STRENGTH OF CERAMICS
 
HARMONY IN THE NATURE AND EXISTENCE - Unit-IV
HARMONY IN THE NATURE AND EXISTENCE - Unit-IVHARMONY IN THE NATURE AND EXISTENCE - Unit-IV
HARMONY IN THE NATURE AND EXISTENCE - Unit-IV
 
Analog to Digital and Digital to Analog Converter
Analog to Digital and Digital to Analog ConverterAnalog to Digital and Digital to Analog Converter
Analog to Digital and Digital to Analog Converter
 
Roadmap to Membership of RICS - Pathways and Routes
Roadmap to Membership of RICS - Pathways and RoutesRoadmap to Membership of RICS - Pathways and Routes
Roadmap to Membership of RICS - Pathways and Routes
 
Model Call Girl in Narela Delhi reach out to us at 🔝8264348440🔝
Model Call Girl in Narela Delhi reach out to us at 🔝8264348440🔝Model Call Girl in Narela Delhi reach out to us at 🔝8264348440🔝
Model Call Girl in Narela Delhi reach out to us at 🔝8264348440🔝
 
Call Girls Service Nagpur Tanvi Call 7001035870 Meet With Nagpur Escorts
Call Girls Service Nagpur Tanvi Call 7001035870 Meet With Nagpur EscortsCall Girls Service Nagpur Tanvi Call 7001035870 Meet With Nagpur Escorts
Call Girls Service Nagpur Tanvi Call 7001035870 Meet With Nagpur Escorts
 
VIP Call Girls Service Hitech City Hyderabad Call +91-8250192130
VIP Call Girls Service Hitech City Hyderabad Call +91-8250192130VIP Call Girls Service Hitech City Hyderabad Call +91-8250192130
VIP Call Girls Service Hitech City Hyderabad Call +91-8250192130
 
9953056974 Call Girls In South Ex, Escorts (Delhi) NCR.pdf
9953056974 Call Girls In South Ex, Escorts (Delhi) NCR.pdf9953056974 Call Girls In South Ex, Escorts (Delhi) NCR.pdf
9953056974 Call Girls In South Ex, Escorts (Delhi) NCR.pdf
 
(ANVI) Koregaon Park Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...
(ANVI) Koregaon Park Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...(ANVI) Koregaon Park Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...
(ANVI) Koregaon Park Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...
 
(PRIYA) Rajgurunagar Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...
(PRIYA) Rajgurunagar Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...(PRIYA) Rajgurunagar Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...
(PRIYA) Rajgurunagar Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...
 
Introduction to Multiple Access Protocol.pptx
Introduction to Multiple Access Protocol.pptxIntroduction to Multiple Access Protocol.pptx
Introduction to Multiple Access Protocol.pptx
 
APPLICATIONS-AC/DC DRIVES-OPERATING CHARACTERISTICS
APPLICATIONS-AC/DC DRIVES-OPERATING CHARACTERISTICSAPPLICATIONS-AC/DC DRIVES-OPERATING CHARACTERISTICS
APPLICATIONS-AC/DC DRIVES-OPERATING CHARACTERISTICS
 
Introduction and different types of Ethernet.pptx
Introduction and different types of Ethernet.pptxIntroduction and different types of Ethernet.pptx
Introduction and different types of Ethernet.pptx
 

ARM Cortex-M3 Training

  • 1. ARM Training CortexM3 Subsystem Date – 28/03/2012 raghav.nayak@st.com
  • 2. 2 Agenda  CortexM3 Subsystem  Peripherals  SW Development  Debugging  Tool Demo
  • 3. CortexM3 Processor  CortexM3 Core  Nested Vector Interrupt Controller  Bus Interface  Debug Access Port  Memory Protection Unit  ETM, ITM and TPIU  WIC  Flash Patch Breakpoint  Data Watchpoint and Trace  ROM Table 3
  • 5. 5 CortexM3 Core  ARM v7M Architecture  Harvard Architecture  3 stage pipeline  Thumb and Thumb-2 Instruction set  Low latency interrupt handling  Speculative Branch Prediction  Single cycle multiplication  H/W division support  Unaligned access  Big Endian support
  • 6. Modes and States  Execution State  Thumb  Debug  Execution Mode  Thread  Handler  Resource Access  Privileged  User or Unprivileged 6
  • 7. Data Types and Registers  Data Type Support  Byte, Half-Word and Word  32 bit pointer  Signed or unsigned Byte, Half-Word, Word and Double word  Registers  16 32-bit register  R0-R12 general purpose register, SP, LR and PC  Banked Stack Pointer (Main and Process)  3 Program Status Register  3 Mask Register  1 Control Register – 3 bit to select access/stack 7
  • 9. Registers …cont…  Program Status Register (PSR)  Application PSR  N, C, Z, V, Q and GE[3-0] Condition flags  Interrupt PSR  Holds the exception number of the currently executed exception  Execution PSR  T and ICI/IT bit fields 9
  • 10. Registers …cont… 10  Mask Register  PRIMASK  1-bit Register  changes the execution priority to 0(Highest Priority)  FAULTMASK  1-bit Register  Changes the execution priority to -1(Hard Fault)  BASEPRI  8-bit Register  Changes the priority level required for preemption
  • 11. Instruction Set 11  Unified Assembly Language Syntax  16 bit or 32 bit Instructions  Data Processing  MOV, ASR, LSL, ROR, ADD, SUB, REV, MUL, UDIV, CMP, TST, CMN, AND, ORR, BIC, BFI, EOR, CPY  Process control  B, BX, BL, CBNZ, CBZ  Load/Store  LDR, STR, LDRH, STRH, LDRB, STRB, LDRD, STRD, LDM, STM, LDREX, STREX  Serial/Miscellaneous  DMB, DSB, ISB, WFI, WFE, MRS, MSR, CPS, SEV, CLREX, SVC
  • 12. Exception  Synchronous or Asynchronous events  External or System events  Reset, Supervisor Call, Fault or Interrupt  Preempting exception  Active, Pending, Active-Pending or Inactive state  Programmable priority  Except Reset = -3, NMI = -2 and HardFault = -1  Stack context supports AAPCS  Exception handler should be AAPCS compliant 12
  • 13. Exception …cont…  Entry Behavior  Stack Alignment correction  Hardware saves context state to stack  Exit Behavior  POP/LDM, LDR or BX loads 0xFxxxxxxx into PC  Hardware restores context state from stack  Revert Stack alignment correction 13
  • 14. Exception …cont… 14  Vector is fetched in parallel to stack activity  R0-R3, R12, xPSR, LR and PC stored and restored by hardware  12 cycle latency PUSH/POP
  • 15. Exception …cont…  Tail Chaining Exception  Optimized exception entry and exit sequence  Six clock cycle for zero wait state memory  No stack PUSH and POP operation 15
  • 16. Exception …cont…  Late arriving exception  High priority exception handling during exception entry sequence  Optimized exception entry and exit sequence 16
  • 17. Fault 17  MemManage  Generated by MPU  instruction or data memory access  BusFault  Memory access failures due to error in Bus Activity  Instruction and data transaction  HardFault  Generic fault used for escalation  UsageFault  Non-memory related events caused by instruction  Undefined instruction, invalid state, exception return
  • 18. Bit Banding  enable direct access to single bit of data  32MB alias region mapped to 1MB bit band region  Memory access is atomic 18
  • 19. Nested Vector Interrupt Controller  32 external interrupts and 5-bit priority level  Reduced interrupt latency  Supports nesting interrupt  Supports dynamic priority  Controls power management scheme  Supports both level and edge triggered interrupt  Privileged access  Little endian register access  Supports Non Maskable Interrupt (NMI)  Provides 24-bit down timer (SysTick) 19
  • 20. Bus Interface  32-bit AMBA3 AHB Lite Port  ICode Interface  Instruction fetch from memory range 0x0-0x1FFFFFFF  No debug access  DCode Interface  Data and debug access on memory range 0x0-0x1FFFFFFF  System Interface  Instruction, Data and debug access on memory range 0x20000000-0xDFFFFFFF and 0xE0100000-0xFFFFFFFF  32-bit AMBA3 APB port  Private Peripheral Bus  Data and debug access on memory range 0xE0000000- 0xE00FFFFF 20
  • 22. System Control Space  32 bit registers in 4KB address space  CPUID and vendor Identification  Fault detection and handling  Interrupt configuration, detection and handling  Exception priority control  Sleep Mode handling  Debug control and status 22
  • 23. Debug  Invasive debug  2 hardware and 6 software breakpoint  Based on CoreSight debug architecture  Serial Wire and JTAG Debug Port  FPB supports halt, single step execution  AHB-AP provides access to memory and registers in the system  Target Identification  Read the CPUID register from System Control Space in ROM table  Breakpoint information from FPB in ROM table 23
  • 24. Peripherals  DMA  8 channels, 16 requests through 16 line  2 Master and 1 Slave port  2 interrupt request line  Single and Burst request with burst length 1024 bytes  Flow control and big endian support  UART  Max 460800 and Min 110 baud  Programmable baud rate, stop bit, parity bit, FIFO trigger level, flow control  32X8 transmit and 32X12 receive FIFO  DMA and Interrupt support 24
  • 25. Peripherals …cont…  Dual Timer  2 configurable 32 or 16 bit down counters  Free running, periodic or one-shot  Programmable 1, 16 or 256 pre-scalar values  Runs at Core clock  interrupt signaling on zero count  Watchdog  32 bit down counter  Enabled or disabled by software  Reset the system to recover from software failure  Provides mechanism to avoid unauthorise access  Runs at Core clock 25
  • 27. uVision4 IDE  Source code editor  Device database  Project Manager  Integrated Make utility  Dialogs for Environment Setting  Target CPU Simulator  Flash Program Utility  Debug using ULINK Debug Adapter 27
  • 28. Software Development Cycle  Create a new Project  Configure device database and tool setting  Create new source files and add to the project  Build the project  Fix build errors  Optimize application  Download image to Flash ROM or SRAM  Execute the application 28
  • 29. ULINK2 Pro  Provides interfaces  JTAG to target board  USB to Host PC  Supports  Checking memory and registers  Breakpoints and single step execution  Image download and execution in real-time  Program memory flash 29
  • 30. Coding Hint  Speed optimization  Size optimization  Power optimization  MicroLIB to reduce code size  Use 32 bit variables for local and parameters  Place scalars at the beginning of a struct variable 30
  • 36. IP Validation  Stand alone validation  Independent of OS  Independent of Flash/ROM code  CPU Startup and Interrupt Initialization code  Scatter file for flexible code execution  No additional latency due to OS  Single test or All test execution 36
  • 38. Reference  Garnet Architecture specification  ARMv7-M architecture reference manual  CortexM3 Technical reference manual 38 10.201.59.94specs