efuse: Correct block sizes for ESP32-C2, ESP32-C3, and ESP32-S3 #964
+4
−3
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.
It seems like I've figured out how the incorrect base addresses that were corrected in #961 arose.
The
esptool's eFuse field definitions do not include the last byte of the block0/register5. The technical reference manual lists the first 22 bits as a named field, it just happens to be that that field is a reserved one, and the remaining 8 bits is an unnamed reserved portions so theesptooldefinitions doesn't list it. It seems like theBLOCK_SIZESdefinitions inespflashwere derived from the sizes as calculated by those field definitions, which therefore were a byte short for -C2/-C3/-S3.It seems like the base addresses were changed to try to adjust for this, but in exchange it accidentally shifted the data in block0 by one byte and block1 by two bytes, and I ran into it while testing out my eFuse write changes against block0. On the other hand, changing fixing the base addresses without changing the block sizes means that we get the opposite problem where block0 works but the other blocks are shifted!
This PR corrects the block sizes for the three affected chips.
The simplest way to verify that these values are correct is by looking at the eFuse register summary tables and subtracting the start address of one block from the start address of the following one, which gives you the size of the block.