1.memory map
Arm has a well-defined memory map for devices based on the Arm v7-M Architecture. The M4 furtherrefines this map in the area of the Peripheral and System address ranges. Below is the system memorymap as defined by Arm:
Arm已经基于ARM V7-M架构为设备提供了定义良好的内存映射。M4在此基础上进一步对外设地址和系统地址进行重新定义,下面是Arm定义的系统内存映射:
Table 2: Arm Cortex-M4 Memory Map
Address | Name | Executable | Description | 备注 |
0x00000000 – 0x1FFFFFFF | Code | Y | Internal NVM (NVM) | 该区域是用于存储程序指令的内部非易失性存储器(NVM)。这是存储代码的区域,通常位于 Flash 存储器中。 |
0x20000000 – 0x3FFFFFFF | Reserved | N | Reserved | 这是保留的地址范围,未分配给具体的功能。 |
0x40000000 – 0x5FFFFFFF | Peripheral | N | On-chip peripheral address space | 该区域用于映射芯片内部的外设寄存器。通过访问这些地址,可以读写外设的控制和状态信息。 |
0x60000000 – 0x9FFFFFFF | External RAM | Y | External / Off-chip Memory | 这是外部可扩展的随机访问存储器(RAM)。它位于芯片外部,用于存储变量、堆栈和额外的数据。 |
0xA0000000 – 0xDFFFFFFF | External Device | N | External device memory | 该区域是用于外部设备的存储器地址空间。这些设备可能是与芯片连接的外部硬件,例如外部设备控制器或扩展模块。 |
0xE0000000 – 0xE00FFFFF | Private Peripheral Bus | N | NVIC, System timers, System Control BlockReserved for system control and debug.Cannot be used for exception vector tables.Data accesses are either performed internallyor on EPPB. Accesses in the range:0xE0000000-0xE0043FFFAre handled within the processor.0xE0044000-0xE00FFFFFAppear as APB transactions on the EPPBinterface of the processor.Any attempt to execute instructions from theregion results in a MemManage fault. | 该区域用于连接私有外设总线的地址空间。这些外设可能包括中断控制器 (NVIC)、系统定时器和系统控制块等。这个区域被保留给系统控制和调试,并且不能用于异常向量表。 |
0xE0100000 – 0xFFFFFFFF | Vendor_SYS | N | Vendor DefinedPartly reserved for future processor featureexpansion.Any attempt to execute instructions from theregion results in a MemManage fault.Data accesses are performed on S-AHB | 这部分地址空间是为未来处理器功能扩展而保留的,并且由厂商自定义。任何从该区域执行指令的尝试将引发内存管理异常。 |