Hello, I'm fairly new to micro controller programming, I'm trying to design a system that has 4 analog inputs, two are voltages V1 and V2 that have to be sampled for a period of time and two are fairly constant values T from a temperature probe and Vref, a known voltage reference.
I'm using a STM32G051
In each main loop cycle all 4 values must be measured, T and Vref is ok to make a single conversion for each since they won't be changing.
V1 and V2 are fast changing signals and in order to analyze them I have to sample them. I'd like to sample each about 200 times with 12bit resolution, that means two uint16_t[200] buffers.
The sampling period should be around 1us.
That means 200us total time per input.
I'd like to 'fire' the sampling, and just wait until both buffers are full. Then stop the sampling to analyze the data.
Can you give me a basic idea on how should I configure the DMA to get that data?
The time is not an issue, if I first sample V1 and then V2 and then T and Vref there is no problem, the while loop doesn't have to execute particularly fast, and there is no other thing the processor should be doing at that time so everything can be synchronous
Thank you very much