Cortex_Programming_01_Intro - Meetup

12 downloads 135 Views 797KB Size Report
Introduction to Embedded. Programming with ... The Cortex-M Family is primarily for low-power micro-controller applications. ... ARM Cortex-M3 Micro-controllers.
Introduction to Embedded Programming with ARM Cortex-M3 Alan Xiao, Ph.D Handheld Scientific, Inc. [email protected]

Why ARM • ARM is a 32-bit RISC instruction set architecture developed by ARM Holdings. • Over 640 processor licenses sold to more than 200 companies • Over 17 billion ARM based chips shipped to date • ARM chips are used in 99% of the world’s cellphones, tablets and other mobile devices. • Microsoft announced support of ARM in Windows 8. • ARM Techcon conference held every year in Santa Clara

Copyright 2011 (c), Alan Xiao

2

Latest ARM Family ARM Family

ARM Arch

ARM-Core

ARM9TDMI

ARMv4T

ARM9TDMI, ARM920T, ARM922T, ARM940T

ARM9E

ARMv5TE

ARM946E-S, ARM966E-S, RM968E-S, ARM966HS

ARMv5TEJ

ARM926EJ-S

XScale

ARMv5TE

XScale, Bulverde, Monahans

ARM11

ARMv6

ARM1136J(F)-S

ARMv6T2

ARM1156T2(F)-S

ARMv6ZK

ARM1176JZ(F)-S

ARMv6K

ARM11-MPCore

Cortex-A

ARMv7-A

Cortex-A8, Cortex-A9, Cortex-A15

Cortex-R

ARMv7-R

Cortex-M

ARMv6-M

Cortex-M0, Cortex-M1

ARMv7-M

Cortex-M3

ARMv7-ME

Cortex-M4

Copyright 2011 (c), Alan Xiao

3

ARM Cortex A Family The Cortex-M Family is primarily for rich OS platforms such as smartphones and tablets ARM Core

Features

Application

Devices

Cortex-A8

600MHz – 1G

Smartphones, tablets, set-top boxes, etc.

Apple A4 (iPhone, iPad), Freescale iMX51, Qualcomm Snapdragon, TI OMAP3

Cortex-A9

Multi-core

Cortex-A15

1-2GHz Multicore

Apple A5, TI OMap4 Competing with x86 (Intel/AMD)

Copyright 2011 (c), Alan Xiao

A15 devices will be available Q4/2012 or early 2013.

4

ARM Cortex-M Family The Cortex-M Family is primarily for low-power micro-controller applications.

ARM Core

Features

Application

Devices

Cortex-M0

Lowest power, smallest ARM MCU. Clock to 24MHz.

Low-end microcontroller

NXP LPC11xx

Cortex-M1

Developed Specifically for FPGA implementation

In FPGA

Soft Core for major FPGA: Altera, Xilinx, Actel.

Cortex-M3

High Performance MCU. Up to 120MHz

Mid to high-end micro-controller

NXP LPC17xx, ST Micro STM32

Cortex-M4

DSP Instructions. Memory Protection Unit. Up to 150MHz

High-end Computationintensive embedded applications

NXP LPC43xx (dual core M4/M0)

Copyright 2011 (c), Alan Xiao

5

ARM Cortex-M3 Micro-controllers • They are micro-controllers – Micro-controllers: have everything in them (flash, ram, peripherals, etc.) – Micro-processors: usually need supporting chips (memory, peripheral bridges, etc.)

• From many different companies (NXP/Phillips, TI, Atmel, too many to list. See list in the tool). • Use the same core so they are essentially the same in the heart: learn one, use any. Copyright 2011 (c), Alan Xiao

6

Cortex-M3 and Operating System • What operating systems can they run? – No Linux/WinCE/Android (since those normally require MMU). – Can run: uC/OSII (Micrium), FreeRTOS (freeRTOS.org), eCOSPro (eCosCentric), CMS (CMX Systems), etc.

• Carefully consider whether the application needs an OS: – Event driven model, SysTick, timer, watchdogs and DMA have powerful OS-like capability – OS adds cost and complexity. Hard to debug. – If the app really needs an OS, consider ARM9/ARM11.

Copyright 2011 (c), Alan Xiao

7

Which Cortex-M3? • STM32 series from STMicroelectronics • Why? – Wide range of devices from low-cost (