How to avoid delay with reading adc values in STM32?
I am using STM32-G07RB and reading the sine signals passed from a LPF circuit. There is a delay between the signals directly from the circuit and when passed through the MCU (adc port) to dac for oscilloscope display. The adc is triggered by the timer interrupt which has a sampling rate of 50KHz and the adc resolution is 12 bits. I see that with the increase in sampling rate the delay decreases, however, in my case the limitation to using sampling rate is 50 KHz for my project. So cannot go beyond. Might have to even lower it with few added tasks for my project. I read that the conversion time and sampling time for 12 bit is 12.5adc cycles and 2.5 cycles respectively. I am not sure how it exactly affected my signal reading, but I assume that the conversion and sampling time has something to do with the delay. I thought of decreasing the resolution so that I can increase the speed if that would make any sense but the amplitude of my signal is quite small, around 50mV so I am not sure if the lower resolution would hamper anything. Is there a way to make the adc value reading: delay increased with signal frequency.
In the figure, the red one is from the MCU dac while the blue one is directly from the circuit.
