Two DMA buffers for alternate ADC samples on the same pin
I sample a 1000Hz periodic signal twice each period. At 50us after the start of the period for samples A and after 850us for samples B with a single ADC and a single channel. I trigger the ADC with a delayed PWM (Combined PWM1 on a G431) and the results go in a circular 32 values long DMA buffer and I get 16 A and 16 B samples alternated in it. Circular since I do not process the values constantly.
But the fact that A and B samples are alternating in one buffer doesn’t please me. Is there a way to get two DMA buffers out with A samples triggered by the rising edge of the timer and B on the falling edge (10us conversion times)?
I have explored DMAMUX a bit. Was new to me. But that seems to only have one input from the ADC that cannot be multiplexed further based on ADC conversion complete combined with the value of the PWM trigger signal.
Is there a logical way to do this?
