cancel
Showing results for 
Search instead for 
Did you mean: 

Unable to access Calibration Words with STM32H503RBT

M_Deloizy
Associate II

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.

1 ACCEPTED SOLUTION

Accepted Solutions
SofLit
ST Employee

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

 

 

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.

View solution in original post

2 REPLIES 2
SofLit
ST Employee

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

 

 

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.
M_Deloizy
Associate II

Thanks very much. It's now Ok !