Skip to main content
Visitor II
January 14, 2025
Question

wrong temperature measurement STM32U585 when ADC_CR_ADCALLIN is set

  • January 14, 2025
  • 1 reply
  • 2122 views

Hello everybody,

i have a strange behavior when doing the linear calibration in ADC1 of the STM32U585.

When the bit is not set while calibrating the ADC the result is pretty good. 
I average the DR value 16 times and the average result is about 3698 which results in a temperature of about 32.21°C

So far so good. Unfortunately when the ADC_CR_CALLIN bit is set the measurement result is "wrong" what means the average is about 1643. The resulting temperature is -142 °C, which is wrong.

 

Anyone an idea why this fails ?

I compared the registers before measurement and they are pretty much the same except the CALLIN bit.

Side note: this is a custom board where VDDA and VREF+ pins are connected to a 3.3V source.

Thanks in advance.

 

    This topic has been closed for replies.

    1 reply

    Technical Moderator
    January 15, 2025

    Hello @martinhaefner9 ,

    Make sure to use latest version of STM32CubeU5 firmware package (than 1.6 version, which contains ADC enhancement and fixes).

    Make sure to properly included the DMB instructions in your calibration code and that the calibration process is correct.

    Visitor II
    January 15, 2025

    Hi @Imen.D 

    sorry, i accidentially hit the resolve button.

    We do not use cubmx software. We use our own drivers for that.
    I have a U585 Rev x device. As I do not use the extendend calibration this sould be no problem right?

    Or is the ADC_CR_CALLIN bit only for extended calibration and not for the simple "Hardware linearity calibration" ?

     

    Thanks in advance

    Martin 

    Visitor II
    January 15, 2025

    Hi @Imen.D ,

    another point.
    If I set the ADC_CR_CALLIN the VSENSE measurement seems broken.

    Can you confirm that ?

     

    Thanks