Skip to main content
Associate II
September 30, 2024
Solved

Set up MPU via CubeIDE to read firmware ID of STM32H563

  • September 30, 2024
  • 1 reply
  • 1617 views

Hi All

I need to access the firmware ID of an STM32H563, while the ICACHE is enabled.  As discussed at https://community.st.com/t5/stm32-mcus-products/stm32h563-hard-fault-when-trying-to-read-uid/td-p/584571 this requires setting the memory area as non-cacheable via the Memory Protection Unit.

I'm trying to do this via the ioc configuration in STM32CubeIDE, using a Nucleo-H563ZI board

As the firmware ID is held in a region starting at 0x08FFF800, I expected to set 0x08FFF800 as the MPU region start address (that is what is shown in another user's screenshot on the other post).  But the configuration UI says "MPU Region Base Address must be 0x0." and it will not allow any other value to be set.

Could somebody please advise on how I set the 12 bytes starting at 0x08FFF800 as non-cachable ?

Thanks

Nic

    Best answer by Mahmoud Ben Romdhane

    Hello @nicgreenway 

    First let me thank you for posting and welcome to the ST Community.

    I reproduced your request, and I was able to change the MPU Base address: 0x08FFF800.

    I suggest that you set firstly the MPU Region Limit Address.

    Knowing that I am using STM32CubeIDE1.15.1.

    Thanks.

    Mahmoud

    1 reply

    Technical Moderator
    October 2, 2024

    Hello @nicgreenway 

    First let me thank you for posting and welcome to the ST Community.

    I reproduced your request, and I was able to change the MPU Base address: 0x08FFF800.

    I suggest that you set firstly the MPU Region Limit Address.

    Knowing that I am using STM32CubeIDE1.15.1.

    Thanks.

    Mahmoud

    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.
    Associate II
    October 2, 2024

    Thanks Mahmoud - yes, the Limit Address has to be set first, then the Base Address can be changed!