cancel
Showing results for 
Search instead for 
Did you mean: 

STM32L4 ADC wrong conversion results

Till Rachow
Associate III
Posted on April 17, 2018 at 11:56

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:

0690X0000060AcEQAU.png

Not working(Channel 11 value is wrong):

0690X0000060AeAQAU.png

Measuring 0 for Vrefint and Temperature:

0690X0000060ActQAE.png

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

0690X0000060AcxQAE.png

What's wrong here?

Maybe

DAHMEN.IMEN

could have a look on that?

Thanks for your answers!

null
1 ACCEPTED SOLUTION

Accepted Solutions
Till Rachow
Associate III
Posted on April 19, 2018 at 17:31

Sorry, i seem to have used an old version of CubeMX and the HAL library.

CubeMX 4.25 with STM32Cube FW_L4 V1.11.0 seems to have fixed the error!

View solution in original post

1 REPLY 1
Till Rachow
Associate III
Posted on April 19, 2018 at 17:31

Sorry, i seem to have used an old version of CubeMX and the HAL library.

CubeMX 4.25 with STM32Cube FW_L4 V1.11.0 seems to have fixed the error!