Skip to main content
Explorer
December 14, 2023
Question

STM32U5 ADC VREFINT_CAL_ADDR

  • December 14, 2023
  • 1 reply
  • 1657 views

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.

    This topic has been closed for replies.

    1 reply

    Technical Moderator
    December 15, 2023

    Hello @cpegeo and welcome to the ST Community :smiling_face_with_smiling_eyes:.

    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.

    STTwo32_0-1702624819386.png

    Best Regards.

    STTwo-32

    cpegeoAuthor
    Explorer
    December 16, 2023

    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?