2024-12-30 10:35 AM
I'm trying to set up a MPU region to block out DCACHE from my SDMMC1 peripheral but I notice whenever a region is activiated in CubeMX, the "region start" field will not let me type any hex value in. Some red text below says that region start must ALWAYS be 0x0. So my quesitons are:
1) If region start must always be 0x0, WHY is it a text field that I can enter something into?
2) Why must a region always start at 0x0? The region I want to block out from the DCACHE does not start at 0x0... I looked at some config documents for other chips (the example was an F7 i believe), and the MPU config allowed typing any hex value into the region start. I'm wondering if there's a bug here? Or maybe I just don't understand the H5 MPU enough.
2024-12-30 04:58 PM
Set the limit address first to the end of the region, then set the base address to the start.
Solved: Re: Assistance requested for setting up MPU via Cu... - STMicroelectronics Community
If that still doesn't work, please attach the IOC in question. Works here:
2024-12-31 02:56 AM - edited 2024-12-31 02:57 AM
Hello @devinw
As explained by @TDK, to modify the base address, it is necessary to first change the value of the MPU region limit address, which is a logical requirement, so, the base address should be a value between [0x00 Limit address].
However, as this seems to be confusing for some people, I have submitted an internal ticket (Ticket 199463) for STM32CubeMX team in order to update the initial warning message to clearly state that the value of the MPU region limit address must be changed first in order to modify the base address.
Thank you!
To give better visibility on the answered topics, please click on Accept as Solution on the reply which solved your issue or answered your question.
2024-12-31 09:07 AM
Ahhhh, got it. Yeah, that is a bit awkward. I would think, allowing one to type the base address first, and then just have the limit address turn red and say "invalid" or something until you type a value larger than base would be a little more intuitive.
I can see why you did it that way though. It just didn't even occur to me to try the limit address first. Doh!