2024-05-05 09:58 AM
Hi, I collecting values from ADC using DMA in my STM32H750BVT. And it have too big repetetive spread in every pin which I checked. Attaching ADC measurments array, attaching graph (y axis is bits and x axis is nr of conversion):
0 bit results it's issue of copying data to excell, don't pay attention on that.
That's my understanding of problem: Internal capasitor of ADC is charging and after that ADC starts conversions which slowly discharging it, after some deadtime that capasitor is recharging.
My question is how can I setup ADC to let it recharge capacitor afrer every conversion in DMA mode?
Didn't I wrongly defined root cause, did I?
Solved! Go to Solution.
2024-05-05 11:54 AM
You didnt tell, you are using separate AVREF , so ... i would say:
So what you see, should happen on the pin : check with scope, whats really on the pin.
+ on Vref ... (adds directly to the ADC result)
+
TL431 is a shunt regulator - not suited here as low impedance reference.
Better use NO adc reference , just connect avref+avdd to vdd , but use a good 3,3V regulator (1% tolerance or so), this is better than fiddling around with not suited parts.
If you really need better , use a precision reference, like REF3030 . https://www.ti.com/product/de-de/REF3030
+
You cannot use internal 1,1V , see rm:
you can only read it , for reference (as its name suggesting).
vref is on a real world pin :
2024-05-05 10:31 AM
I need to add that i tried to change alot of settings of ADC in Cube MX but nothink helped, my current setup is
2024-05-05 11:04 AM - edited 2024-05-05 11:05 AM
Hi,
>My question is how can I setup ADC to let it recharge capacitor afrer every conversion in DMA mode?
No , the sampling cap is connected to pin on the (8.5 ticks here) sampling time - on every conversion.
So what you see, should happen on the pin : check with scope, whats really on the pin.
+
Connect 100nF cer.cap from ADC in (this pin) to gnd. (short wires !) Then check again, what comes out.
+
You set "continuous" conversion request - you want this really ?
2024-05-05 11:12 AM
I already had connected 10nf capacitor, tried without that 10nf cap and the result is the same.
my osciloscope don't see any pulsations.
Those pulsations fully repetetive i reviewed my PCB and found nothink which can have such frequency.
I'm debuging my STM throw STlink, but I don't think it can't generate pulsations on supply line because i have near 200uf of ceramic caps near my MCU
2024-05-05 11:17 AM
Ok, I found issue- it was my external V ref which I made using TL431. Have no idea why it pulsating, probably pullup resistor have to big value.
Could someone direct me to the guide how to change Vref source to internal 1.1? I didn't found that information in internet
2024-05-05 11:54 AM
You didnt tell, you are using separate AVREF , so ... i would say:
So what you see, should happen on the pin : check with scope, whats really on the pin.
+ on Vref ... (adds directly to the ADC result)
+
TL431 is a shunt regulator - not suited here as low impedance reference.
Better use NO adc reference , just connect avref+avdd to vdd , but use a good 3,3V regulator (1% tolerance or so), this is better than fiddling around with not suited parts.
If you really need better , use a precision reference, like REF3030 . https://www.ti.com/product/de-de/REF3030
+
You cannot use internal 1,1V , see rm:
you can only read it , for reference (as its name suggesting).
vref is on a real world pin :