I want to capture the duty cycle of an input PWM with the timer feature PWM Input on CH1.
Channel 1 is configured on rising edge, channel 2 is configured on falling edge.
The DMA is configured for this timer on channel 1, channel 2 can't have DMA.
To compute the duty cycle, I need the total period widh (store in CCR1) and the pulse width (stored in CCR2).
My goal is to start a measurement, and when the DMA is complete, get several values in order to compute an average duty cycle.
Is it possible to get both values (multiple times) with only one channel configured with a DMA.
No, I'm afraid you can't
As far as I know, it is not possible to configure this DMA channel to transfer data from two different memory locations.
To give better visibility on the answered topics, please click on Accept as Solution on the reply which solved your issue or answered your question.