Module 2 Embedded Systems
Module 2 Embedded Systems
ARM Architecture
1
Department of EECE-19ECS431-EMBEDDED SYSTEMS 2
2
CISC vs RISC
1. Instructions
2. Pipelines
3. Registers
4. Load-store architecture
2. Pipelines
• The processing of instructions is broken down into
smaller units that can be executed in parallel by
pipelines.
2. Pipelines
• The processing of instructions is broken down into
smaller units that can be executed in parallel by
pipelines.
3. Registers
4. Load-store architecture
• The processor operates on data held in registers.
• Separate load and store instructions transfer data
between the register bank and external memory.
• Memory accesses are costly, so separating memory
accesses from data processing provides an advantage
because you can use data items held in the register
bank multiple times without needing multiple
memory accesses.
• In contrast, with a CISC design the data processing
operations can act on memory directly.
High code density is useful for applications that have limited on-
board memory, such as mobile phones and mass storage devices.
• When both J and T bits are 0, the processor is in ARM state and
executes ARM instructions-when power is applied to the processor.
• In ARM the R13, R14, R15, and CPSR (current program status
register) registers are called SFRs (special function registers) since
each one is dedicated to a specific function.
• GPRs (R0-R12) do not have any specific function and are used for
storing general data.
• Some ARM instruction formats (the Thumb) have only R0-7 but
every variation of ARM chip has R13-R15 SFRs.
• As the CPU fetches the opcode from the program memory, the
program counter is incremented automatically to point to the next
instruction.
• The wider the program counter, the more memory locations a CPU
can access. That means that a 32-bit program counter can access a
maximum of 4G (232 = 4G) bytes of program memory locations.
• This means that the ARM family can access addresses 0x00000000 to
0xFFFFFFFF
Department of EECE-19ECS431-EMBEDDED SYSTEMS 45
The ARM Memory Map
• Although this 4G bytes of memory space can be allocated to on-
chip or off-chip memory; however, at the time of this writing, none
of the members of the ARM microcontroller family have the entire
4G bytes of on-chip memory populated
• The data RAM space is used for data variables and stack and is accessed
by the microcontroller instructions.
• The data RAM space is read/write memory used by the CPU for storage
of data variables, scratch pad, and stack
codes
The ARM Memory Map
3. On-chip EEPROM
• A block of memory from 1K bytes to several thousand bytes is set
aside for EEPROM memory
• Although in some applications the EEPROM is used for program code
storage, it is used most often for saving critical data.
• Not all ARM chips have on-chip EEPROM.
An Example of ARM
Memory Allocation
• Development
Board
LPC2148
Pin Diagram
LPC2148
• Block Diagram
LPC2148
Applications
LPC2148
• Features
• PACKAGE: – 32-bit ARM7TDMI-S microcontroller in a tiny LQFP64 package with 64 Pins
• MEMORY: – 40 kB of on-chip static RAM – 512 kB of on-chip flash program memory
• ADC – Two 10-bit A/D converters(AD0 and AD1) provide a total of 14 analog inputs – conversion times as
low as 2.44 μs per channel
• DAC – Single 10-bit D/A converter provides variable analog output
• TIMERS – Two 32-bit timers/external event counters – Each timer with four capture and four compare
channels – Six PWM outputs – 1 Watchdog timer
• RTC – Low power real-time clock with independent power and dedicated 32 kHz clock input
• Serial Interfaces: – I2C-bus: • Two Fast I2C-bus with 400 kbit/s (I2C0,I2C1)
– UART communication: • Two UARTs (UART0,UART1)
– SPI (Serial Peripheral Interface) and SSP(Synchronous Serial Port)
• GPIO: – Up to 45 of 5 V tolerant fast general purpose I/O pins in a tiny LQFP64 package
• INTERRUPTS: – Total of 22 interrupt Sources – Vectored interrupt controller with 16 configurable
priorities and vector addresses
• Speed : 60 MHz maximum CPU clock speed from programmable on-chip PLL with settling time of 100 μs
• OSCILLATOR: – On-chip integrated oscillator operates with an external crystal in range from 1 MHz to 30
MHz
• Power saving modes: – Idle mode , – Power-down mode
• CPU operating voltage : Range of 3.0 V to 3.6V (3.3 V ± 10 %) with 5 V tolerant I/O pads
• Other Features: • In-System / In-Application Programming (ISP/IAP) via on-chip boot-loader software.
• USB 2.0 Full Speed compliant Device Controller with 2 kB of endpoint RAM.
• In addition, the LPC2148 provide 8 kB of onchip RAM accessible to USB by DMA
LPC2148 – Bus Architecture
In LPC2148 three types of busses are used
to connect the core with other peripherals
on chip.