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. javascript 之数据类型--01

    写在前面 国庆整理资料时,发现刚开始入门前端时学习JS 的资料,打算以一个基础入门博客记录下来,有不写不对的多多指教: 先推荐些书籍给需要的童鞋 <JavaScript 高级程序设计.pdf&g ...

  2. 修改vs17中的cordova模板

    因为visual studio 2017创建的默认cordova-ios的版本自动编译带有swift语言的插件会出现异常,cordova-ios升级到4.3.1,并且配置build.json能解决问题 ...

  3. 10.python3标准库--加密

    ''' 加密可以保护消息安全,以便验证其正确性并保护消息不被截获. python的加密支持包括hashlib和hmac,hashlib使用标准算法生成消息内容签名,hmac则用于验证消息在传输过程中未 ...

  4. 阻止MyEclipse启动项目时自动跳转的debug视图

    启动web项目时,习惯使用debug方式启动,但此时会自动跳转到debug视图,很不习惯. 通过修改首选项配置,可以禁止跳转

  5. java基础13 接口(及关键字:interface、implements)

    接口 1.接口的定义格式 interface 接口名{ } interface :接口的关键字 implements:实现接口的关键字 2.接口的作用 1.程序的解耦.(低耦合)        2.定 ...

  6. Python股票信息抓取(二)

    在一的基础上,想着把所有的折线图放在一个图中,然后图的结果如图所示: 不是略丑,是很丑~ 依然的单进程,只是将图标结果放在了一张图里 代码如下: #-*-coding:utf-8 -*- import ...

  7. 以太坊go-ethereum客户端docker安装(二)开发(dev)环境搭建

    在上一篇博客中,讲述了基于docker怎么搭建一个go-ethereum节点.作为开发人员,如果只是单纯的拥有一个Full node,还无法满足正常的开发.比如说,进行转账交易,你要考虑是否拥有一定的 ...

  8. linux中的vim 编辑一行内容,如何使光标快速移动到行首和行尾以及行中间某处啊?

    光标定位G 移至行行首nG 移至第n行行首n+ 移n行行首n- 移n行行首n$ 移n行(1表示本行)行尾0 所行行首$ 所行行尾^ 所行首字母h,j,k,l 左移移移右移H 前屏幕首行行首M 屏幕显示 ...

  9. 下划线css

    /* <div class="text">header</div> */ .text { /* 作用元素 */ display: inline-block; ...

  10. MySQL表设计:每一种商品有不确定个数的属性

    I personally would use a model similar to the following: The product table would be pretty basic, yo ...