Cortex M0 and DesignStart
Cortex M0 and DesignStart
An Overview
1
ARM Processors Portfolio
Processor
Class
ARM7
ARM9
ARM11
M
R
A
2
Equipment Adopting ARM Cores
M Intelligent toys
Utility Meters
IR Fire Detector
Exercise
Machines Energy Efficient Appliances
Intelligent Vending
Tele-parking
A
3
ARM Cortex-M Series Family
ARM Core Hardware Hardware Saturated DSP Floating
Processor Thumb® Thumb®-2
Architecture Architecture Multiply Divide Math Extensions Point
Cortex-M4 ARMv7E-M Harvard Entire Entire Optional Yes Yes Yes Optional
4
ARM Cortex-M0 Processor
5
Cortex-M0 Overview
ARMv6-M Architecture
Von-Neumann Architecture
32-bit Architecture
Thumb technology
RTL is configurable
Synthesizable
Gate count 12 ~ 25K
6
Cortex-M0 Processor Programmers Model
The Cortex-M0 is designed to be programmed fully in C
No need to write assembly code
Thumb technology
16-bit and 32-bit instructions
7
Cortex-M0 Block Diagram
ARM Cortex-M0 Microprocessor
Interrupt
Requests and
NMI JTAG/Serial-Wire
Nested Vector Debug Interface
Interrupt Processor Debug
Controller Core Subsystem
(NVIC)
Wakeup
Interrupt
Controller (WIC) Internal Bus System
Power management
interface AHB LITE
Bus interface
8
Cortex-M0 Registers
Register bank R0
R1
R2
R3
Low
R4 Registers
R5
General purpose
register
R6
R7
R8
R9
R10 High
Registers
R11
R12 MSP
Stack Pointer (SP) R13(banked) Main Stack Pointer
9
Reduced Instruction Set
Only 56 Instructions
Mostly coded on 16-bit
Operate on the 32-bit registers
Option for fast MUL 32x32 bit in 1
cycle
Instruction types
Branch instructions
Data-processing instructions
Load and store instructions
Status register access instructions
Miscellaneous instructions
10
Cortex-M: binary upwards compatibility
Floating Point
11
ARM Cortex-M0 Processor
Memory Architecture
12
Cortex-M0 Memory Map (Example)
Chip Silicon
PPB NVIC
Cortex-M0 SCS
Debug Ctrl
AHB bus
External SRAM,
External LCD SD card
FLASH
13
Cortex-M0 Memory Map (Example)
Chip Silicon
NVIC
Cortex-M0 PPB SCS
Debug Ctrl
AHB bus
External SRAM,
External LCD SD card
FLASH
14
Cortex-M0 Memory Map
Reserved for other purposes 0xFFFFFFFF Debug Control
ROM table
Reserved
0xE0100000 System Control Block
512MB Reserved (SCB)
Private peripherals 0xE00FFFFF
e.g. NVIC, SCS Private Peripheral Bus Nested Vectored
0xE0000000
System Control Space Interrupt Controller
0xDFFFFFFF
(SCS) (NVIC)
Mainly used for external peripherals
e.g. SD card External Device 1GB
Reserved
Reserved
SysTick Timer
0xA0000000 Break point unit
0x9FFFFFFF Reserved
Data watch point unit
Mainly used for external memories
e.g. external DDR, FLASH, LCD
External RAM 1GB Reserved
0x60000000
Mainly used for on-chip peripherals 0x5FFFFFFF
e.g. AHB, APB peripherals Peripherals 512MB
0x40000000
0x3FFFFFFF
Mainly used for data memory
e.g. on-chip SRAM, SDRAM SRAM 512MB
0x20000000
0x1FFFFFFF
Mainly used for program code Code 512MB
e.g. on-chip FLASH
0x00000000
15
Cortex-M0 Program Image
Code region
Interrupt vectors
0x00000040
0x0000003C
SysTick vector
0x00000038
PendSV vector
Reserved
0x0000000C
Hard fault vector
0x00000008
NMI vector
16
Cortex – M0 Reset Behaviour
After reset: Reset
17
Cortex M0 Design Start
18
Cortex M0 Design Start vs Full Cortex M0
19
Lab
Consider you have a simple Cortex M0 based Micro-controller with the following
memory map
Internal SRAM – 1 KB – Starting Address 0x0000 0000
A LED Peripheral – One word – Address 0x5000 0000
We will write assembly program to toggle the LEDs and simulate the program
We will analyse the resulting binary file and the disassembly file
In the Next Section we will see how to design AHB-Lite Compliant LED Peripheral
20