TIM1 ch1 as pwm, ch2 as cc to trigger adc caputre
On STM32F105 chip, i need to output a pwm, then adc caputure the voltage on pwm high stable level.
So i try to set tim1 ch1 to pwm out, and then set tim1 ch2 as compare output wih no pwm to trigger adc capture with DMA. (CC2<CC1)
Eventrually, i cannot achieve this.
on cubeMX platform.
- I use tim1 ch1 as pwm output, and use tim3 ch1 to trigger adc, set tim3 "Trigger Event Selection" as "Update Event", and set adc "External Trigger Conversions Source" as "Timer3 Trigger Out event", then i can step into adc interrupt.
- When i use tim1 ch1 as pwm output, and use tim1 ch2 to trigger adc, set tim1 "Trigger Event Selection" as "Output Compare(OC2REF)", and set adc "External Trigger Conversions Source" as "Timer1 capture compare 2 event", then i cannot step into adc interrupt
Both of above, i can step into CC interrupt, and i put gpio set in CC interrupt, the behaviour is right.
What am i wrong, I so am so confused on this, can someone help. I have been for stuck for several days.
Thanks a lot.