Download as docx, pdf, or txt
Download as docx, pdf, or txt
You are on page 1of 3

DEPARTMENT OF ELECTRONICS &INSTRUMENTATION ENGINEERING

KAKATIYA INSTITUTE OF TECHNOLOGY & SCIENCE, WARANGAL


(An Autonomous Institute under Kakatiya University, Warangal)
ASSIGNMENT-A2
CODE-SUBJECT: U18CI604 EMBEDDED SYSTEM WITH ARM PROCESSOR
NAME:
ROLL NUMBER:

1. Utilizing memory map illustration of ARM Cortex-M4 processor, discuss the following key
aspects of memory access:
(1) Important memory regions

ANS: Code, SRAM, Peripherals, RAM, Devices, System.

(2) Allocation of space towards bit band memory and aliasing

ANS:

(3) Internal and external PPB allocation details System control space
2. Consider the memory map of ARM Cortex-M4 processor and analyse the same on the following
aspects:

(1) Built-in components in the Cortex-M3 and Cortex-M4 memory map


(2) Multiple bus interface for different memory regions

3. Consider the memory map of ARM Cortex-M4 processor and analyse the same on the following
aspects:

(1) Data alignment and unaligned data access support


Ans:

(2) Limitations on unaligned data access

ANS:

 Unaligned transfers are not supported in Load/Store multiple instructions


 Stack operations (PUSH/POP) must be aligned
 Exclusive accesses (such as LDREX or STREX) must be aligned; otherwise, a fault
exception (usage fault) will be triggered
 Unaligned transfers are not supported in bit-band operations, results will be
unpredictable if you attempt to do so
4. Consider the memory map of ARM Cortex-M4 processor and analyse the same on the following
aspects:

(1) Bit band memory regions and their corresponding aliasing regions

ANS: Bit Band Memory Regions:

0x20000000-0x200FFFFF (SRAM bit-band region, 1MB)

0x40000000-0x400FFFFF (Peripheral bit-band region, 1MB)

Bit Band Aliasing Regions:


0x22000000-0x23FFFFFF (SRAM bit-band region, 1MB)

0x42000000-0x43FFFFFF (Peripheral bit-band region, 1MB)

(2) Mapping bit band memory regions into their corresponding aliasing regions

(3) Mechanism of reading, writing, and updating bits in the bit band region with the aliasing
addresses

ANS: Write a bit using aliasing

LDR R0,=0x22000008;

MOV R1,#1;

STR R1,[R0];

Read a bit using aliasing

LDR R0,=0x22000008;

Ldr R1,[R0];

5. Develop assembly code sequence for inspecting 3rd bit of location 0x20000000 using bit band
aliasing address, if the bit is found to be set, then clear registers R1-R7 otherwise leave them
unchanged.

(1) Write the code without using bit band aliasing technique
(2) Write the code for achieving the same task using bit band aliasing technique
(3) Compare the two ways of coding in terms of speed and memory usage

You might also like