If you are working with the ESP32, it is not all that uncommon to get strange boot loops that is hard to explain. One such boot loop starts with MMU error starts with the line “1162 mmu set 00010000, pos 00010000“.
Here is a full example log of what you might see.
rst:0x10 (RTCWDT_RTC_RESET),boot:0x13 (SPI_FAST_FLASH_BOOT)
configsip: 0, SPIWP:0xee
clk_drv:0x00,q_drv:0x00,d_drv:0x00,cs0_drv:0x00,hd_drv:0x00,wp_drv:0x00
mode:DIO, clock div:2
load:0x3fff0018,len:4
load:0xff001cff,len:1451071
1162 mmu set 00010000, pos 00010000
1162 mmu set 00020000, pos 00020000
1162 mmu set 00030000, pos 00030000
1162 mmu set 00040000, pos 00040000
1162 mmu set 00050000, pos 00050000
1162 mmu set 00060000, pos 00060000
1162 mmu set 00070000, pos 00070000
1162 mmu set 00080000, pos 00080000
1162 mmu set 00090000, pos 00090000
1162 mmu set 000a0000, pos 000a0000
1162 mmu set 000b0000, pos 000b0000
ets Jun 8 2016 00:22:57
1162 mmu set 00010000, pos 00010000 - what it means
From the looks of it, this seems like a memory management unit fault. We are not quite sure what the offset or position printed means, but it seems like this happens when the ESP32 bootloader tries to check for a valid executable app located at flash address 0x10000.
Knowing that, we can now look at what can potentially cause this problem for you.
Bad ESP32 power supply
Data corruption on the flash SPI bus is something that can definitely cause this problem. However, this is not likely all that often because the bootloader was able to execute and this error popped up only when address 0x10000 was accessed.
However, a good power supply is a very basic requirement and make sure you check your 3.3V ESP32 power rail for low noise and stability.
Incorrect flash access setting
Setting the flash to an operation speed that is higher than specified can cause data corruption, that is a potential problem. Also, incorrect flash access mode setting is also an issue.
Try using different flash modes when you compile your application and also when you flash it.
In the screenshot above for example, the flash is set to DIO mode.
You can try the DOUT flash mode and that will most likely get rid of the MMU boot loop error. Ensure that you are using DOUT mode by:
- Setting flash size and mode to DOUT in menuconfig
- Setting flash size and mode in ESP32 Flash Download Tool
We could solve our MMU boot loop problem with this. It was observed in one of our custom PCBs with ESP-WROOM-32 (16 MB).
ESP32 flash interface PCB design problem
If you have routed ESP32 to flash PCB traces with massive length mismatches or if the traces are routed too close to operate without interference from adjacent traces, this could be the problem for you.
The flash bus is very high speed and contains frequency components as high as 500 MHz that needs to be handled properly. The only workaround that you can have in a case like this is to lower the flash operation frequency down to 20MHz.
Finally, if none of the above seems to work for you, feel free to reach out to us. We also offer review and design services to make custom hardware development easier for you.
Feel free to ask away via the Quick Contact form in the sidebar, or leave a comment below.
Change Log
- Initial Release: 03 March 2021
References
- Reference 1: ESP-WROOM-32D Datasheet. 16MB Variant
- Reference 2: Related ESP32 forum post
1 comment