Postby Angus » Thu Jun 11, 2020 12:50 am
Hi Josu,
Thanks for pointing this out. Some peripheral registers in ESP32 are actually mapped at two equivalent memory ranges in the address space (the buses are named DPORT and AHB). DPORT addresses start with 0x3FF and AHB addresses start with 0x600.
Performance is generally faster when accessing via DPORT. However there are some cases where one or the other bus must be used (see "ESP32 ECO and Workarounds for Bugs" document sections "3.3.When the CPU accesses peripherals and writes a single address repeatedly, some writes may be lost. " and "3.18.CPU has limitations when accessing peripherals in chips").
Early versions of ESP-IDF included duplicate register mappings for both DPORT and AHB ranges, but most duplicate AHB bus addresses have been removed from ESP32 TRM and ESP-IDF for simplicity and only DPORT bus addresses are documented.
Looks like the AHB addresses were not changed in esptool. None of the ECO document issues with address space access apply to esptool accesses, as these memory reads and writes happen with hundreds of other instructions executed in between each access. However it should be updated for consistency in any case.
Angus