cancel
Showing results for 
Search instead for 
Did you mean: 

Problems with ADC data

Anna_Chen
Associate

Hello,

We are uing STM32F303RBT6 controller to read the current parameters of stepper motors.

So, 7ADC1 ADC channels are used, which are read through DMA1 Channel1 . InitADC() driver initialization is succesfull, StartADC() conversion is called once every 1ms, but the raw data in the adc_hw_data[] buffer is incorrect.

MC power supply voltage VDD and pin VDDA = 3.270V, voltages at the inputs aof ADC channels PA2 = 3.054V, PA3 = 2.845V.

Цhen we use an F4 series controller with similar parameters everything works as it should.

So, what cn be te problem?

Thank you in advance.

 

3 REPLIES 3
AScha.3
Chief II

Hi,

Did you calibrate the ADC?

( Calling hal_adcex_calibration_start... )

If you feel a post has answered your question, please click "Accept as Solution".

Hi,

We don't use the HAL library, we use LL instead, and through its calls the calibration is called and seems to complete properly, judging by the flag.

I cannot tell about the LL , I only use HAL lib.

Because it's working and If i need something fast, anyway the DMA is to be used and this can be started by HAL also.

So would recommend to use the hal functions, to get it running, then still can try to do it faster - if needed.

If you feel a post has answered your question, please click "Accept as Solution".