-
Notifications
You must be signed in to change notification settings - Fork 8.3k
soc: st: stm32: h7rsxx: Fix MPU region for read-only id flash region #99745
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Conversation
Set correct MPU memory type and size for the uniqe device id, package code and ADC VREF/TS calibration read-only flash region. (DEVICE_NON_SHAREABLE | REGION_512B | P_RO_U_NA_Msk)) is the same as REGION_IO_ATTR (used for PERIPH region) but RO instead of RW. The size is reduced to 512 bytes, because RM0477 table 28 and chapter 5.3.12 state that this read-only flash area has a size of 512 bytes. Signed-off-by: Thomas Decker <[email protected]>
|
djiatsaf-st
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
I guess we'll need more of those soon, that would be useful. |
it's called IO for a reason |
Do you plan to do it ? |
I can, any suggestions for a good name? |
I'm not sure if this has a lot of value considering that
(i.e., do we really care about the region being read-only?) |



Set correct MPU memory type and size for the uniqe device id, package code and ADC VREF/TS calibration read-only flash region.
(DEVICE_NON_SHAREABLE | REGION_512B | P_RO_U_NA_Msk)) is the same as REGION_IO_ATTR (used for PERIPH region) but RO instead of RW. The size is reduced to 512 bytes, because RM0477 table 28 and chapter 5.3.12 state that this read-only flash area has a size of 512 bytes.
I introduced this region with PR #97364, both configurations work, but it is more correct with this one.
Testing: Network still initializes with this changes (reads uniqe device ID for creating the mac address per default).
Cross-check: Will mem-fault during zephyr init when commenting out this
MPU_REGION_ENTRY.Open question: Create a
#definefor this type?REGION_IO_ATTR_ROfor example