2023-02-11 07:13 PM
Hello i am trying to make N pulse in some exact time, when i adjust a timer with one pulse mode,
everything is ok but pulse always start with a delay because it is basically a pwm single starting with low side and high side. I want my pulse start immediately and after delay. Whatever i try i couldnt make it. (pwm modes, change channel polarity, idle state, counting up or down etc..)
Please somebody help me
Pulse timer output channel normally must be low state.
My signal looks like this, but if you look closely signal starts with a low delay and pulse after,
how to make it start with a pulse after delay?
Solved! Go to Solution.
2023-02-12 01:59 AM
I don't quite understand what do you want to achieve, but one way how to reduce the "initial delay" is to set TIMx_CNT to TIMx_CCRx-1 before each start of the timer.
JW
2023-02-11 08:55 PM
Not sure if it fits here, to generate a seriee of pulses of any timings, some STM32 have a DMA channel over timer channel, cycling over a table of toggle compares values.
2023-02-12 01:59 AM
I don't quite understand what do you want to achieve, but one way how to reduce the "initial delay" is to set TIMx_CNT to TIMx_CCRx-1 before each start of the timer.
JW
2023-02-12 06:20 AM
Thank you very much, that is simple and effective solution.