cancel
Showing results for 
Search instead for 
Did you mean: 

How to make N pulses with One pulse mode, but pulse first delay after.

OYoru.1
Associate II

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?

0693W00000YAWl0QAH.bmp

1 ACCEPTED SOLUTION

Accepted Solutions

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

View solution in original post

3 REPLIES 3
S.Ma
Principal

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.

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

Thank you very much, that is simple and effective solution.