http://www.mikroe.com/download/eng/documents/compilers/mikropascal/pro/arm/help/memory_organization.htm

The Cortex-M3 and Cortex-M4 have a predefined memory map. This allows the built-in peripherals, such as the interrupt controller and the debug components, to be accessed by simple memory access instructions. 
Thus, most system features are accessible in program code. The predefined memory map also allows the Cortex-M3 processor to be highly optimized for speed and ease of integration in system-on-a-chip (SoC) designs.

Overall, the 4 GB memory space can be divided into ranges as shown in picture below. The Cortex-M3 design has an internal bus infrastructure optimized for this memory usage.

A graphical representation of the ARM memory is shown in picture below :

The ARM Cortex-M3 memory is divided into following regions :

  • System - .
  • Private Peripheral Bus - External - Provides access to :
    • the Trace Port Interface Unit (TPIU),
    • the Embedded Trace Macrocell (ETM),
    • the ROM table,
    • implementation-specific areas of the PPB memory map.
  • Private Peripheral Bus - External - Provides access to :
    • the Instrumentation Trace Macrocell (ITM),
    • the Data Watchpoint and Trace (DWT),
    • the Flashpatch and Breakpoint (FPB),
    • the System Control Space (SCS), including the MPU and the Nested Vectored Interrupt Controller (NVIC).
  • External Device - This region is used for external device memory.
  • External RAM - This region is used for data.
  • Peripheral - This region includes bit band and bit band alias areas.
    • Peripheral Bit-band alias - Direct accesses to this memory range behave as peripheral memory accesses, but this region is also bit addressable through bit-band alias.
    • Peripheral bit-band region - Data accesses to this region are remapped to bit band region. A write operation is performed as read-modify-write.
  • SRAM - This executable region is for data storage. Code can also be stored here. This region includes bit band and bit band alias areas.
    • SRAM Bit-band alias - Direct accesses to this memory range behave as SRAM memory accesses, but this region is also bit addressable through bit-band alias.
    • SRAM bit-band region - Data accesses to this region are remapped to bit band region. A write operation is performed as read-modify-write.
  • Code - This executable region is for program code. Data can also be stored here.

Memory Maps

The Cortex-M3 processor has a fixed memory map.

Some of the memory locations are allocated for private peripherals such as debugging components.

1. Fetch Patch and BreakPoint Unit (FPB)

2. Data WatchPoint and Trace Unit (DWT)

3. Instrumentation Trace Macrocell (ITM)

4. Embedded Trace Macrocell (ETM)

5. Trace Port Interface Unit (TPIU)

6. ROM Table

The Cortex-M3 processor has a total of 4 GB of address space.

SRAM: 0.5 GB.        

The SRAM memory range is for connecting internal SRAM.

On-chip peripherals: 0.5 GB

supports bit-band alias and is accessed via the system bus interface.

External RAM: 1 GB.

Program execution is allowed.

External devices: 1 GB.

Program execution is not allowed.

System-level components + internal private peripheral buses + external private peripheral bus + vendor-specific system peripherals: 0.5 GB.

Private peripheral bus:

1. AHB private peripheral bus, for Cortex-M3 internal AHB peripherals only.

2. APB private peripheral bus, for Cortex-M3 internal APB devices as well as external peripherals.

Bit-Band Operations

Bit-band operation support allows a single load/store (read/write) operation to access a single data bit.

Bit-band regions:

1. The first 1 MB of the SRAM region

2. The first 1 MB of the peripheral region

They can be accessed via a separate memory region called the bit-band alias.

To set bit 2 in word data in address 0x20000000

Write:

1. Without Bit-Band:

LDR R0, =0x20000000 ; Setup address LDR R1, [R0] ;

Read ORR.W R1, #0x4 ; Modify bit

STR R1, [R0] ; Write back result

2. With Bit-Band:

LDR R0, =0x22000008 ; Setup address

MOV R1, #1 ; Setup data

STR R1, [R0] ; Write

Read:

1. Without Bit-Band:

LDR R0, =0x20000000 ; Setup address

LDR R1, [R0] ; Read

UBFX.W R1, R1, #2, #1 ; Extract bit[2]

2. With Bit-Band:

LDR R0, =0x22000008 ; Setup address

LDR R1, [R0] ; Read

For read operations, the word is read and the chosen bit location is shifted to the LSB of the read return data.

For write operations, the written bit data is shifted to the required bit position, and a READ-MODIFY-WRITE is performed.

最新文章

  1. JS移动端滑屏事件
  2. ReactDom.render和React.render的区别
  3. POJ 2001:Shortest Prefixes
  4. ios8消息快捷处理——暂无输入框
  5. codeforces 450 B Jzzhu and Sequences
  6. 解决npm安装模块时 npm err! registry error parsing json
  7. python实战--Http代理服务器
  8. Linux shell-grep
  9. 解读python中SocketServer源码
  10. 版本控制之一:SVN服务器搭建与安装(转)
  11. 百度OCR文字识别-身份证识别
  12. VS2017 调试期间无法获取到变量值查看
  13. python科学计算之numpy
  14. jQuery.extend 函数使用详解
  15. Django--Admin 组件
  16. ML(2)——感知器
  17. 使用 keepalived 设置虚拟 IP 环境(转载)
  18. Azure 托管镜像和非托管镜像对比
  19. Spring框架之什么是IOC的功能?
  20. Jquery EasyUI 各组件属性、事件详解

热门文章

  1. css 水平、垂直居中
  2. VS2015_动态链接库学习
  3. FusionCharts 用法心得
  4. java基础12 抽象类(及关键字:abstract)
  5. Selenium_Grid
  6. python基础(9)--递归、二叉算法、多维数组、正则表达式
  7. JS函数练习题
  8. 安迪的第一个字典(UVa10815)
  9. 报错org.springframework.dao.InvalidDataAccessResourceUsageException: could not extract ResultSet; SQL [n/a]; nested exception is org.hibernate.exception.SQLGrammarException: could not extract ResultSet"
  10. JQuery 分割字符串