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.

Cortex-M3 and Cortex-M4 Memory Organization的更多相关文章

  1. ARM 架构、ARM7、ARM9、STM32、Cortex M3 M4 、51、AVR 之间有什么区别和联系?(转载自知乎)

    ARM架构:  由英国ARM公司设计的一系列32位的RISC微处理器架构总称,现有ARMv1~ARMv8种类. ARM7:       一类采用ARMv3或ARMv4架构的,使用冯诺依曼结构的内核. ...

  2. 【ARM-Linux开发】ARM7 ARM9 ARM Cortex M3 M4 有什么区别

    ARM7 ARM9 ARM Cortex M3 M4 区别 arm7 arm9 可以类比386和奔腾, 不同代,arm9相比arm7指令集和性能都有所增强,arm7和arm9都有带mmu和无mmu的版 ...

  3. Implementation of Serial Wire JTAG flash programming in ARM Cortex M3 Processors

    Implementation of Serial Wire JTAG flash programming in ARM Cortex M3 Processors The goal of the pro ...

  4. 【freertos】002-posix模拟器设计与cortex m3异常处理

    目录 前言 posix 标准接口层设计 模拟器的系统心跳 模拟器的task底层实质 模拟器的任务切换原理 cortex M3/M4异常处理 双堆栈指针 双操作模式 栈帧 EXC_RETURN 前言 如 ...

  5. ARM Cortex M3系列GPIO口介绍(工作方式探讨)

    一.Cortex M3的GPIO口特性    在介绍GPIO口功能前,有必要先说明一下M3的结构框图,这样能够更好理解总线结构和GPIO所处的位置. Cortex M3结构框图     从图中可以看出 ...

  6. ARM Cortex M3(V7-M架构)硬件启动程序 一

    Cortex-m3启动代码分析笔记 启动代码文件名是STM32F10X.S,它的作用先总结下,然后再分析. 启动代码作用一般是: 1)堆和栈的初始化: 2)中断向量表定义: 3)地址重映射及中断向量表 ...

  7. STM32学习之路入门篇之指令集及cortex——m3的存储系统

    STM32学习之路入门篇之指令集及cortex——m3的存储系统 一.汇编语言基础 一).汇编语言:基本语法 1.汇编指令最典型的书写模式: 标号 操作码        操作数1, 操作数2,... ...

  8. ARM Cortex M3(V7-M架构)硬件启动程序 二

    解析 STM32 的启动过程 解析STM32的启动过程 当前的嵌入式应用程序开发过程里,并且C语言成为了绝大部分场合的最佳选择.如此一来main函数似乎成为了理所当然的起点——因为C程序往往从main ...

  9. stm32和cortex M3学习内核简单总结

    1.stm32综述 2.寄存器组 3.操作模式和特权级别 4.存储器映射 5.中断和异常 6.其他 Stm32综述 这可以说是我第一款认真学习的单片机了,学完这个就要开启我通往arm9的大门了,接下来 ...

  10. CORTEX -M3 : Registers in depth

    http://www.zembedded.com/cortex-m3-registers-in-depth/ Thanks for the overwhelm response you show in ...

随机推荐

  1. windows下制作debian U盘启动

    制作平台:Windows 7 制作debian版本:debian 7.4 wheezy 1.下载引导镜像,包含三个文件:boot.img.gz(解压备用).initrd.gz 和 vmlinuz. h ...

  2. 转:google测试分享-问题和挑战

    原文: http://blog.sina.com.cn/s/blog_6cf812be0102vxer.html 前言:这个系列分享的内容大部分都是出自于<google是如何测试的>的书, ...

  3. PHP解决并发问题的几种实现

    对于商品抢购等并发场景下,可能会出现超卖的现象,这时就需要解决并发所带来的这些问题了 在PHP语言中并没有原生的提供并发的解决方案,因此就需要借助其他方式来实现并发控制. 方案一:使用文件锁排它锁 f ...

  4. webpack编译时No PostCSS Config的解决方法

    1. { loader:"postcss-loader", options: { // 如果没有options这个选项将会报错 No PostCSS Config found pl ...

  5. apache、nginx、php、mysql 编译参数查询

    nginx编译参数查看:/usr/local/nginx/sbin/nginx -V apache编译参数查看:cat /usr/local/apache2/build/config.nice mys ...

  6. 语音性别识别 - 使用R提取特征

    步骤 1)安装R.windows操作系统安装包的链接:https://cran.r-project.org/bin/windows/base/ 2)切换当前路径为脚本所在路径 点击 文件 > 改 ...

  7. c++ primer 4 数组和指针

    类比的思想学习数组和指针,c++提供类似于vector和迭代器的低级复合类型——数组和指针.与vector相似,数组可以保存某一种类型的一组对象:而他们的区别在于,数组的长度固定,数组一经创建就不允许 ...

  8. loadrunner中大小写字符转换函数封装:

    //封装ConvertToXXX函数: int ConvertToUpper(char * sInput, char * sNew) { sInput = (char *)strupr(sInput) ...

  9. powershell 获取 CPU 物理 / 逻辑核心数

    转载请注明: 仰望高端玩家的小清新 http://www.cnblogs.com/luruiyuan/   获取 CPU 逻辑核心数的方法为:总逻辑核心数 = 物理核心数 * 每核逻辑核心数   其中 ...

  10. 2017年浙江中医药大学大学生程序设计竞赛(重现赛)D - CC的神奇背包

    题目描述 cc最近收到了好多礼物,对着满地大小不一的礼物,她想要一个包来装,于是dd就掏出了一个会说话的神奇背包给cc装礼物.cc为了一次性装尽可能多的礼物,于是跟这个背包定下了一个规则,对每个礼物, ...