2025-01-14 06:38 AM
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.
2025-01-15 01:33 AM
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.
2025-01-15 02:35 AM
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
2025-01-15 02:58 AM
Hi @Imen.D ,
another point.
If I set the ADC_CR_CALLIN the VSENSE measurement seems broken.
Can you confirm that ?
Thanks
2025-01-15 06:21 AM
I removed the "Accept Solution".
Help others to solve their issues - STMicroelectronics Community
2025-01-17 06:09 AM
Please have a look at the reference manual which describes how to read the temperature of the internal temperature sensor.
Maybe you have the same issue described in this post:
Solved: STM32U575 Temperature Sensor ADC4 calculation - STMicroelectronics Community
2025-01-19 10:12 PM
Hi @Imen.D ,
thank you for the hint about ADC4 and temperature measurement. But that is not our Problem, we already respected this.
I try to repeat my last Question:
Is the ADC_CR_CALLIN bit only for extended calibration and not for the simple "Hardware linearity calibration" ?
Or is the "Harware linearity calibration" part of the "normal" calibration when I simply set ADC_CR_ADCAL.
Thanks again