ESP32-C6/H2: Describe the registers light-sleep retention needs - #482
Closed
JurajSadel wants to merge 2 commits into
Closed
ESP32-C6/H2: Describe the registers light-sleep retention needs#482JurajSadel wants to merge 2 commits into
JurajSadel wants to merge 2 commits into
Conversation
Retaining the TOP power domain across light sleep has to back up whole register windows by name. Three areas were not described at all: - SPI1's shared MSPI windows (permission/ECC/timing/MMU). Both MSPI controllers implement them, but the SVD only described them on SPI0, so derive SPI1's copies from it. - The H2's L1 cache controller, which the SVD omits entirely. It is the same block the C6 exposes as EXTMEM, so copy that peripheral and give it the H2's CACHE name. - PLIC_MXINT_CONF/PLIC_UXINT_CONF at offset 0x3FC, which also required widening both PLIC address blocks to cover it. Co-authored-by: Cursor <cursoragent@cursor.com>
Co-authored-by: Cursor <cursoragent@cursor.com>
JurajSadel
marked this pull request as draft
July 30, 2026 09:31
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Light-sleep TOP-domain retention in esp-hal (esp-rs/esp-hal#5874) has to back up whole register windows by name, and three areas were not described at all. Until now esp-hal reached them through hardcoded addresses, which is what this review comment asked to fix.
SPI_FMEM_PMS*/SPI_SMEM_PMS*), ECC, external-RAM timing and MMU registers; ESP-IDF'sspi_mem_reg.hparameterises every one of them by controller index. The SVD only described them on SPI0, socommon_patches/spi1_mspi_shared.yamlderives SPI1's copies from it. Being derived, the generatedspi1.rsre-exports SPI0's types rather than duplicating them.EXTMEM(242 registers at the same offsets, based at0x600C_8000), so_cache.ymlcopies that peripheral and gives it the H2'sCACHEname. This follows the existingesp32c5/svd/patches/_cache.ymlprecedent.PLIC_MXINT_CONF/PLIC_UXINT_CONFat offset0x3FC. Reaching that offset also required widening both PLICaddressBlocksizes from0x98to0x400; the previous size stopped atMXINT_CLAIM(0x94) and would have made the new register fall outside the block.Only the C6 and H2 include
plic.yamland the newspi1_mspi_shared.yaml, so no other chip's generated sources change.Test plan
cargo xtask build ...regenerates both PACs with no further diffMade with Cursor