历史上的今天
返回首页

历史上的今天

今天是:2025年01月07日(星期二)

正在发生

2020年01月07日 | Cortex-M3 and Cortex-M4 Memory Organization

2020-01-07 来源:eefocus

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.

推荐阅读

史海拾趣

Corsair Memory Inc公司的发展小趣事

Corsair Memory Inc公司,由Don Lieberman、John Beekley与Andy Paul于1994年在美国加州佛利蒙创立。起初,公司专注于为英特尔系统生产Cache-On-A-Stick (COAST)模组。然而,随着英特尔将快取内存由主板移至处理器晶体中,Corsair迅速调整战略,将注意力转向电脑内存市场。这一转变不仅使Corsair避开了潜在的市场风险,更为其后续的内存业务奠定了坚实的基础。

AITSEMI公司的发展小趣事

随着产品线的不断完善,AITSEMI公司开始积极寻求市场机会,并逐步在全球范围内建立销售网络。通过与各大消费电子品牌的紧密合作,AITSEMI的芯片产品成功应用于音频功放和电源管理等领域,为全球消费者提供了更优质的产品体验。同时,公司还积极拓展医疗、工业控制、照明等新兴市场,为公司的持续增长提供了强大的动力。

Aavid Thermalloy公司的发展小趣事

技术创新是AITSEMI公司保持竞争力的关键。多年来,公司始终坚持将大量资源投入研发领域,不断推出具有创新性的产品和技术。通过自主研发和与高校、研究机构的合作,AITSEMI在集成电路设计、制造工艺等方面取得了多项突破,为公司的持续发展提供了源源不断的动力。

固驰(GUERTE)公司的发展小趣事

固驰电子深知产品质量是企业生存之本,因此始终将品质控制放在首位。公司不仅建立了完善的质量管理体系,还通过了ISO9001:2015质量管理体系认证和美国UL产品认证,这标志着固驰电子的产品质量达到了国际先进水平。此外,公司还积极申请专利,目前已拥有50项国家专利,进一步巩固了其在行业内的技术领先地位。

Dawning Precision Co Ltd公司的发展小趣事

随着市场竞争的加剧,Dawning意识到只有不断创新才能在行业中立于不败之地。公司加大了对研发的投入,聘请了一批在电子制造领域具有丰富经验的专家。在专家团队的带领下,Dawning成功开发出了多款具有自主知识产权的高精度电子产品,这些产品不仅在性能上领先同行,而且在价格上也更具竞争力。这些创新产品的推出,极大地提升了Dawning在市场上的竞争力。

Davicom公司的发展小趣事

面对不断变化的市场环境和客户需求,Davicom始终保持创新精神,不断寻求新的发展机遇。公司紧跟行业趋势,积极投入研发资源,推出了一系列具有创新性的产品。这些新产品不仅提升了公司的市场竞争力,也为公司的持续发展注入了新的动力。

问答坊 | AI 解惑

到底买不买笔记本

我现在是大二的学生,不知道要不要买笔记本。希望高人指点一下。 我是大二电子信息工程的学生,犹豫要不要买笔记本 不买的理由: 1。每天要上自习11点回宿舍,大二马上下学期了,可多得很。 2。要考研 3。明年考4级 4。本科读完后想买个好一 ...…

查看全部问答>

TMS320F28335的资料

本帖最后由 jameswangsynnex 于 2015-3-3 20:03 编辑 TMS320F28335采用176引脚LQFP四边形封装,其功能结构参见参考文献。其主要性能如下: 高性能的静态CMOS技术,指令周期为6.67 ns,主频达150 MHz; 高性能的32位CPU,单精度浮点运 ...…

查看全部问答>

EDK底层的设备驱动[代码示例]

EDK底层的设备驱动[代码示例]…

查看全部问答>

哪位大虾做过NPB的五个测试程序(EP,CG,IS,MG,FT)移植到在VXworks?

哪位大虾做过NPB的五个测试程序(EP,CG,IS,MG,FT)移植到在VXworks? 有移植好的可以分享吗??现在正在做,由于是新手,很大的困难。…

查看全部问答>

谁画LM3S9B96的板子了吗?

用了LM3S9B96的那些资源啊?   EPI外扩了什么啊?…

查看全部问答>

谈谈物联网

本帖最后由 jameswangsynnex 于 2015-3-3 20:03 编辑 谈谈物联网产品及前景!! …

查看全部问答>

请问IAR for msp430如果要用来开发8051需要下载补充什么?

请问IAR for msp430如果要用来开发8051怎么办?再下载一个for 8051的版本?安装的时候有无冲突?官网那种全系列的有破解的么?…

查看全部问答>

IAR6.3使用JLINK不能下载程序

1、 我今天使用IAR6.3对STM32进行下载,出现这样的错误: fatal error:Communication timed out:Requested 1 bytes,received 0 bytes!  session aborted! 开始以为是JLINK有问题了,但是我返回用Keil下载又可以用,不知道是为什么,是不是 ...…

查看全部问答>

【抢先看】DIY遥控坦克 之 坦克打靶功能

       既然是DIY坦克那么仅仅能够移动还是不够的,移动只是坦克的基本功能,我们还应该为坦克配备强大火力,那么我们就先从打靶功能开始吧。        今天我们要给大家展示的是坦克打靶功能的原型设计, ...…

查看全部问答>

求tiva c lanuchpad的i2c例程

做实验要用到tm4c123g的i2c程序,在网上找了好几天。。。。 唉!都没找到。 在网上找到m3的例程用不了…

查看全部问答>