AnsweredAssumed Answered

STM32L4 ADC wrong conversion results

Question asked by Till Rachow on Apr 17, 2018
Latest reply on Apr 19, 2018 by Till Rachow

Hi,

 

i have a very strange behaviour on my STM32L433CCTx.

 

Im am configuring the ADC with STM32Cube FW_L4 V1.10.0 to measure multiple channels. As long as i configure 5 or less conversions in the regular conversion group, everything works out fine, i start conversion with HAL_ADC_Start_DMA() and get my results after HAL_ADC_ConvCpltCallback was called.

 

However, as soon as i add a 6th conversion, the first! conversion result will be wrong (value is 560-564 instead of what it was with only 5 conversions :2000-2005). The other 5 conversions are correct.

 

Why can't i add a 6th conversion without the first conversion going wrong?

 

The second problem i got was when i tried to work around this error by doing my 6th and 7th conversion in the injected group instead: In this group i measure Vrefint and the internal temperature sensor.

 

If the conversion order is

1.Vrefint

2.Temperature

both values will be 0.

 

If the conversion order is

1.Temperature

2.Vrefint

both values will be 1507, which is the correct value for Vrefint.

 

Are Vrefint and Temperature codependent?

Is it possible to convert both and get the right results?

 

Working:

 

Not working(Channel 11 value is wrong):

 

Measuring 0 for Vrefint and Temperature:

 

Measuring 1507(correct value for Vrefint) for Vrefint and Temperature:

 

What's wrong here?

 

Maybe Imen D could have a look on that?

 

Thanks for your answers!

Outcomes