27 Memory Management and Protection Units (MMU, MPU)
The decision an MPU can make, based on this information, is to allow or deny a process to access the memory
region or peripheral. An MMU has the same function, but additionally it redirects the virtual memory access,
which the process acquired, into a physical memory access that can possibly reach out an entirely different
physical memory region. This way, MMU-governed memory can be remapped on a process-by-process ba-
sis.
27.3.2.1 Embedded Memory
The on-chip memory is governed by fixed-function MPUs, configurable MPUs, and MMUs:
Name
Size
ROM0
384 KB
ROM1
64 KB
64 KB
SRAM0
128 KB
128 KB
SRAM1 (aliases)
128 KB
32 KB
72 KB
SRAM2
128 KB
8 KB
RTC FAST (aliases)
8 KB
RTC SLOW
8 KB
Static MPUs
ROM0, ROM1, the lower 64 KB of SRAM0, SRAM1 and the lower 72 KB of SRAM2 are governed by a static MPU.
The behaviour of these MPUs are hardwired and cannot be configured by software. They moderate access to
the memory region solely through the PID of the current process. When the PID of the process is 0 or 1, the
memory can be read (and written when it is RAM) using the addresses specified in Table 27-1. When it is 2 ~ 7,
the memory cannot be accessed.
RTC FAST & RTC SLOW MPU
The 8 KB RTC FAST Memory as well as the 8 KB of RTC SLOW Memory are governed by two configurable MPUs.
The MPUs can be configured to allow or deny access to each individual PID, using the RTC_CNTL_RTC_PID_
CONFIG_REG and DPORT_AHBLITE_MPU_TABLE_RTC_REG registers. Setting a bit in these registers will allow
the corresponding PID to read or write from the memory; clearing the bit disallows access. Access for PID 0 and
1 to RTC SLOW memory cannot be configured and is always enabled. Table
mappings of the registers.
Espressif Systems
Table 27-1. MPU and MMU Structure for Internal Memory
From
0x4000_0000
0x3FF9_0000
0x4007_0000
0x4008_0000
0x3FFE_0000
0x400A_0000
0x4000_0000
0x3FFA_E000
0x3FFC_0000
0x3FF8_0000
0x400C_0000
0x5000_0000
Submit Documentation Feedback
Address range
To
0x4005_FFFF
0x3FF9_FFFF
0x4007_FFFF
0x4009_FFFF
0x3FFF_FFFF
0x400B_FFFF
0x4000_7FFF
0x3FFB_FFFF
0x3FFD_FFFF
0x3FF8_1FFF
0x400C_1FFF
0x5000_1FFF
27-2
612
Governed by
Static MPU
Static MPU
Static MPU
SRAM0 MMU
Static MPU
Static MPU
Static MPU
Static MPU
SRAM2 MMU
RTC FAST MPU
RTC FAST MPU
RTC SLOW MPU
and
27-3
define the bit-to-PID
ESP32 TRM (Version 5.2)
Need help?
Do you have a question about the ESP32 and is the answer not in the manual?