Académique Documents
Professionnel Documents
Culture Documents
Bryan Lawrence - Solutions Marketing Manager Richard York - Director of Product Marketing
Todays Presenters
Richard is director of product marketing in the ARM processor division with responsibility for the team marketing the ARM embedded and microcontroller CPU products including the Cortex-M and Cortex-R series. He is also responsible for the overall embedded roadmap for these products and also for specialised derivatives such as the ARM SecurCore processor family. He has worked at ARM for over fourteen years, during which time he has been closely involved with the design of ARM7TDMI core and was an architect in ARMs advanced research and development group. He is also the principal architect of the ARM RealTrace debug system.
Bryan Lawrence currently runs a team of Solutions Architects who demonstrate and promote the integration of ARM IP into large SOC devices required by an application. For the past two years he has had a particular focus on microcontroller applications and the use of 32bit processing in this market. He has worked for ARM for 8 years and was the product manager for the system level design product ; PrimeXsys and was a system design consultant within ARM working with silicon partners who were designing ARM based ASICs.
Before joining ARM Bryan was a project manager with VLSI Technology designing ARM processors into mobile phone devices.
Agenda
Part 1 Introduction Part 2 Hardware Overview Part 3 Software Overview Part 4 Tools and debug Part 5 Getting Started
Introduction
PIC microcontrollers can certainly handle some embedded
applications They work and are fairly affordable but limited memory, fairly low performance Many architectural limitations that make code reuse difficult hardware stack, inefficient indirect addressing and so on
Touch screen controller Accelerometer GPS / Bluetooth Battery monitor Joystick/touchpad controller
Introduction
Why ARM Cortex Microcontrollers?
Multiple vendors much more choice Very low power Very easy to use (completely programmable in C) Excellent software development support Much more performance available if you need it In many cases cheaper! (now as low as 65 cents)
* *
Focus on low power and energy efficiency Two decades of Partnership success
memory memory
SoC SoC
PushPush
NMI
ISR 1
ISR 2
ISR 3
Pop
10
11
1.5
0.5
0 PIC18
12
PIC32
Cortex-M3
1.5
0.5
13
Agenda
Part 1 Introduction Part 2 Hardware Overview Part 3 Software Overview Part 4 Tools and debug Part 5 Getting Started
14
15
16
PIC16/18 uses a special register for indirect addressing PIC16/18 requires register bank switching for accessing I/O registers
17
ARM registers can hold data or pointers Same register set for every ARM processor No need for any sort of bank switching
18
Main Stack Pointer (MSP) : default Process Stack Pointer (PSP) : for application tasks in OS
Exception table
Fetch instruction to branch
Top-level handler
Routine handles re-entrancy
IRQHandler PROC STMFD sp!,{r0-r4,r12,lr} MOV r4,#0x80000000 LDR r0,[r4,#0] SUB sp,sp,#4 CMP r0,#1 BLEQ C_int_handler MOV r0,#0 STR r0,[r4,#4] ADD sp,sp,#4 LDMFD sp!,{r0-r4,r12,lr} SUBS pc,lr,#4 ENDP
Push Push
NMI
ISR 1
ISR 2
ISR 3
Pop
20
Push Push
NMI
ISR 1
ISR 2
ISR 3
Pop
21
Low power
Cortex-M processors are designed for low power applications
and focus on energy efficiency:
Device PIC32MX3xx PIC18LF2x20 Active power 680uA/MHz 100-200uA/MHz Energy efficiency 2.23 DMIPS/mW 0.31 0.95 DMIPS/mW 0.1 DMIPS/mW Cortex-M3 - NXP1300 200uA/MHz
22
Agenda
Part 1 Introduction Part 2 Hardware Overview Part 3 Software Overview Part 4 Tools and debug Part 5 Getting Started
23
Peripherals:
Reserved words for PIC registers need to be replaced Use device driver libraries to make software development easier If you need to directly access to hardware registers, use pointers
24
25
Benefits to the embedded developer Consistent software interfaces for silicon and middleware vendors
Simplifies re-use across Cortex-M processor-based devices Reduces software development cost and time-to-market Reduces learning curve for new Cortex microcontroller developers
27
CMSIS example
#include vendor_device.h /* lm3s_cmsis.h, LPC17xx.h, stm32f10x.h, etc */ void main(void) { common name for system initialization (from CMSIS SystemInit(); v1.30 this function is called from startup code) NVIC_SetPriority(TIMER1_IRQn, 0x8); NVIC_EnableIRQ(TIMER1_IRQn, 0x0); } void TIMER1_IRQHandler(void) { /* Timer 1 processing */ } void SysTick_IRQHandler(void) { /* Systick timer processing */ }
28
Just make sure the interrupt handler names match the ones in the vector table
29
Product Portfolio
C/OS-II Embedded RTOS C/OS-MMU C/OS-MPU C/OS-III Embedded RTOS Unlimited objects Preemptive and Round-Robin Scheduling C/TCP-IP Embedded TCP/IP v4 stack DHCPc, DNSc, FTP, HTTPs, POP3c, SMTPc, SNTPc, TELNETs, Shell C/USB-Host HID, CDC, MSD, Audio, Printer Classes OHCI, EHCI, UHCI C/USB-Device Bulk-device stack HID, MSD, CDROM Classes C/USB-OTG C/Bluetooth SPP, RFCOMM, L2CAP and HCI layers C/CAN CAN Framework C/CANopen I (Small Sensor Slave) C/Modbus Master and/or Slave, RS-232C or RS-485 ASCII and/or RTU C/GUI Embedded Graphical User Interface C/FS Embedded File System FAT32, Long Filenames Many media drivers C/BuildingBlocks Software time-of-day clock (C/CLK) Character-based LCD (C/LCD) Shell (C/Shell) CRC Calculation (C/CRC) C/Probe Run-time data monitor Any CPU (8-, 16-, 32-, 64-bit or DSP) Any compiler/linker (ELF or IEEE695) Any interface (RS-232C, TCP/IP, USB, etc.) With or without an RTOS
Agenda
Part 1 Introduction Part 2 Hardware Overview Part 3 Software Overview Part 4 Tools and debug Part 5 Getting Started
31
Compiler suites
Keil Microcontroller Development Kit for ARM (MDK-ARM) ARM RealView Development Suite (RVDS) mbed IAR Embedded Workbench for ARM Code_red Technologies (Red Suite 2) LPCXpresso from NXP Raisonance (Rkit-ARM) Rowley Associates (Crosswork 2) National Instrument (LabVIEW Embedded Module for ARM) Tasking (VX-toolset) more to come
32
Debug
Cortex-M processors include comprehensive debug features
33
Debug tools
Keil : ULINK2, ULINK-Pro ARM : RealView-ICE, RealView Trace Lauterbach : TRACE32 Segger : J-Link / IAR :J-Link Signum : JTAGJet / JTAGJet-Trace Code Red Technologies : Red probe, LPC-Link ST-LINK etc
34
Agenda
Part 1 Introduction Part 2 Hardware Overview Part 3 Software Overview Part 4 Tools and debug Part 5 Getting Started
35
36
37
Summary
The ARM approach to microcontrollers is somewhat different
to that of Microchip We are committed to working with a wide number of suppliers, each bringing differentiation to their products hundreds of silicon parts already available (Atmel, Ember,
EnergyMicro, Luminary/TI, NXP,ST, Toshiba and so on) and many more on the way
39