2017-11-02 06:22 AM
I am seeing very noisy measurements on shunt adc.
I attached schematics and gerbers.
Could suggest how to eliminate noise on adc lines (line connected to shunt and going to STM32F303 chip?
regards
#adc #l6206pd #noiseSolved! Go to Solution.
2017-11-25 02:05 PM
ADC values are here, but it is funny how they difference of one measurement to another is quite big - could it be that they are indeed correct or possible, or it is some flaw in my program?
I am using:
hadc3.Init.Resolution = ADC_RESOLUTION_12B;
and
sConfig.SamplingTime = ADC_SAMPLETIME_2CYCLES_5;
Should I use half word, or word in dma alignment?
hdma_adc3.Init.PeriphDataAlignment = DMA_PDATAALIGN_WORD;
2017-11-25 06:04 PM
OK found the mistake... I was using,
hadc1.Init.DataAlign = ADC_DATAALIGN_LEFT;insteadhadc1.Init.DataAlign = ADC_DATAALIGN_RIGHT;
Also I found out that using:
hdma_adc1.Init.MemDataAlignment = DMA_PDATAALIGN_HALFWORD;
is OK.
Now I got reasonable results, thanks for all help, there is a code under git link I post above - maybe it helps somebody.
2017-11-28 05:32 AM
Hi, you did a great job.
To be honest the second part of your issue (coordinating the timer, ADC and push everything into the RAM trough DMA) was a bit above my coding skills
:)
.