当前位置:网站首页>【ESP32学习-2】esp32地址映射
【ESP32学习-2】esp32地址映射
2022-07-06 09:16:00 【csdndulala】
本文始于esp32技术参考手册中的一段描述
1.3.2.4 Internal SRAM 1
Internal SRAM 1 的容量为 128 KB,其既可以被两个 CPU 通过数据总线 0x3FFE_0000 ~ 0x3FFF_FFFF 读写,
也可以被两个 CPU 通过指令总线 0x400A_0000 ~ 0x400B_FFFF 读写。
指令总线地址和数据总线地址访问的 word 是逆序的。即地址:
0x3FFE_0000 与 0x400B_FFFC 访问到相同的 word
0x3FFE_0004 与 0x400B_FFF8 访问到相同的 word
0x3FFE_0008 与 0x400B_FFF4 访问到相同的 word迷惑的是为什么inter SRAM 1 通过数据和指令总线访问不同地址,得到的是相同的内容?为什么这样设计?有什么好处?
遍寻资料,终于找到了准确的解答:可以定制化调整IRAM和DRAM的大小。(同时也解答了,esp32内部ram是怎么划分使用的)ROM0为何需要Remap:
1.3.2.1 Internal ROM 0
Internal ROM 0 的容量为 384 KB,可以被两个 CPU 通过指令总线 0x4000_0000 ~ 0x4005_FFFF 读取。
访问 ROM 0 的头 32 KB 的地址(0x4000_0000 ~ 0x4000_7FFF)可以被重新映射 到 Internal SRAM 1 中的一部
分,这部分原本被地址 0x400B_0000 ~ 0x400B_7FFF 访问。重映射时,这 32 KB SRAM 不能再被地址
0x400B_0000 ~ 0x400B_7FFF 访问,但是可以被数据总线 (0x3FFE_8000 ~ 0x3FFE_FFFF)访问。实现方式是
分别为两个 CPU 配置一个寄存器,即为 PRO_CPU 置位 DPORT_PRO_BOOT_REMAP_CTRL_REG 寄存器的
bit 0 或者为 APP_CPU 置位 DPORT_APP_BOOT_REMAP_CTRL_REG 寄存器的 bit 0。网上没有找到解释,我的理解:
rom0作为指令空间一共有384KB(已经非常大了),所分配的地址空间不会全部使用,可以通过remap的方式,将rom的地址映射为ram的地址。这样可以加快一级引导程序的运行。
边栏推荐
- Comparison of solutions of Qualcomm & MTK & Kirin mobile platform USB3.0
- Wangeditor rich text component - copy available
- Mysql database interview questions
- [yarn] yarn container log cleaning
- 锂电池基础知识
- inline详细讲解【C语言】
- SQL time injection
- Connexion sans mot de passe du noeud distribué
- open-mmlab labelImg mmdetection
- 4、安装部署Spark(Spark on Yarn模式)
猜你喜欢
open-mmlab labelImg mmdetection
共用体(union)详解【C语言】
mysql实现读写分离
【CDH】CDH5.16 配置 yarn 任务集中分配设置不生效问题
Mysql database interview questions
Machine learning -- linear regression (sklearn)
B tree and b+ tree of MySQL index implementation
Redis interview questions
FTP file upload file implementation, regularly scan folders to upload files in the specified format to the server, C language to realize FTP file upload details and code case implementation
Word typesetting (subtotal)
随机推荐
列表的使用
B tree and b+ tree of MySQL index implementation
Using LinkedHashMap to realize the caching of an LRU algorithm
Reno7 60W super flash charging architecture
GNN的第一个简单案例:Cora分类
互联网协议详解
C语言函数之可变参数原理:va_start、va_arg及va_end
Redis interview questions
Password free login of distributed nodes
ESP8266通过arduino IED连接巴法云(TCP创客云)
Reno7 60W超级闪充充电架构
荣耀Magic 3Pro 充电架构分析
wangeditor富文本组件-复制可用
Bubble sort [C language]
锂电池基础知识
电商数据分析--用户行为分析
Contiki源码+原理+功能+编程+移植+驱动+网络(转)
Common regular expression collation
【presto】presto 参数配置优化
C language, log print file name, function name, line number, date and time