2023-12-14 01:22 PM
The #define value for VREFINT_CAL_ADDR in the stm32u5xx_ll_adc.h HAL file has an odd value address (0x0BFA 07A5). This causes attempts to access the value to fault with an unaligned access. I have checked for other devices (STM32F4, STM32L0, Etc.) and these all have even values for the address. Can we please update to the correct address. Thanks.
2023-12-14 11:20 PM
Hello @cpegeo and welcome to the ST Community 😊.
According to the RM0456, the Memory address of the VREFINT_CAL is 0x0BFA 07A5 which makes the value mentioned in the stm32u5xx_ll_adc.h is right.
Best Regards.
STTwo-32
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.
2023-12-15 10:58 PM
I agree with you that this is the correct value. But that isn't the issue. The issue is that this causes attempts to access the value to fault with an unaligned access.
E.g.
uint16_t calValue = *VREFINT_CAL; //< FAILS WITH UNALIGNED ACCESS.
What is the correct way to access this value then?