2024-10-15 08:03 AM
I try to read VREFINT_CAL word :
uint16_t *VREFINT_CAL=(uint16_t *)(0x08FFF810);
uint16_t v = *VREFINT_CAL;
When running, Hard fault interrupt is called.
Memory protect seems not active (MPU not used, GTZC not enabled).
What can be the problem ?
Thanks.
Solved! Go to Solution.
2024-10-15 08:09 AM - edited 2024-10-15 08:11 AM
Hello,
This behavior is observed when the ICACHE is enabled and when RO and OTP regions are accessed. So you need to use the MPU.
Please refer to this article: https://community.st.com/t5/stm32-mcus/how-to-avoid-a-hardfault-when-icache-is-enabled-on-the-stm32h5/ta-p/630085
2024-10-15 08:09 AM - edited 2024-10-15 08:11 AM
Hello,
This behavior is observed when the ICACHE is enabled and when RO and OTP regions are accessed. So you need to use the MPU.
Please refer to this article: https://community.st.com/t5/stm32-mcus/how-to-avoid-a-hardfault-when-icache-is-enabled-on-the-stm32h5/ta-p/630085
2024-10-15 09:17 AM
Thanks very much. It's now Ok !