cancel
Showing results for 
Search instead for 
Did you mean: 

Sampling PWM pulse

Dmytro  Kryvyi
Associate

Hello,

In my project I need to sample single PWM pulse with ADC (Current and Voltage). I'm using STM32L451CCU.

I have configured timer 15 to produce PWM signal with channel 1 and used channel 2 as the clock source for triggering timer 2 through ETR1 , the timer 2 must start its operating at the rising edge of PWM pulse. And actually it does, but there are some cases where it stated too far from start of PWM pulse (I have tried to set filers and rest of the ideas, but no one is working). The ADC is configured to launch the conversion with DMA by using TRGO, and at the end of conversion the timer will be disabled.

See the attached files.

It's not expected behavior.

0693W00000KcRINQA3.png0693W00000KcRIXQA3.pngAnd it's how it should work and working at ~90%:

0693W00000KcRJ1QAN.png0693W00000KcRJ6QAN.pngThanks everyone who help me to solve this issue!

0 REPLIES 0