Showing results for 
Search instead for 
Did you mean: 

Getting high always in the one Pulse mode .How can I get complete OnePulse correctly?

Associate II

Hi Team,

Currently I am working on the STM32h745ZIQ-nucleo boards.

In my project I am working on timers in 2 individual controllers. I am generating OnePluse in first controller using OnePulse mode. I want to capture the falling edge of the pulse (generated by the first controller) and generate onePulse using the 2nd controller of the other timer. and again I want to capture the falling edge of the Pulse (generated by the 2nd controller) and generate one Pulse using the 1st controller.

I want this continuously. so I enabled the OnePulse mode through the cube MX and generates the code for the 2 timers of 2 individual controllers.

After writing all the Input capture interrupt code and flashed in the controllers. Once I click on the RESET button I am getting only the high Pulse and of OnePulse. It is not coming to the 0V. Could you please help me out the configurations and all to get the complete OnePulse?

Best Regards



If I understand it correctly you are generating complementary pulses on two outputs (when one output is in High, other output is in Low). That can be done much easier by using any timer with complementary outputs (TIM1,TIM8, TIM15, TIM16, TIM17) in (complementary) PWM mode. By adjusting period and duty cycle you can independently control pulse widths for both outputs. Moreover that can be also done by "general purpose timers" (using two independet PWM outputs, one "left aligned" and second "right aligned").

Two mutually cascaded timers in one-pulse mode should do the same, but it is a more complicated way. Procedure for set up one-pulse mode is in paragraph 41.3.13 in reference manual:

Hi @Michal Dudka​ 

As we are doing safety related project it has to generate only one pulse so we planned to achieve this by using One-Pulse mode.

Please help me out in the One-Pulse mode configurations. Which call back we will get and what are the mandatory things we need to do.

I am getting only high pulse It is not coming to 0V to get complete One-Pulse.

Please share me the example Of One-Pulse mode as well as complimentary Output PWM mode.



Two "mutually triggered" timers in one-pulse mode is probably not safer then one timer in complementary mode. Examples are in STM32Cube_FW_H7_V1.9.1... package. Search for folder/example "TIM_ComplementarySignals" and "TIM_OnePulse".

Associate II

Yes @Michal Dudka​ 

you are right it is more better and safer one timer in complementary mode. But we have two individual controllers. 1 CM4 timer should be low the other CM4 timer should be high like same as you said.

But How can We achieve the same thing (Complementary mode) in 2 different timers of 2 different controllers.

I did not realize that you have two cores with separated timers. I have no experiences with dualcore STMs. Is it not possible to use one timer and change its parameters by both cores ?

Associate II

In my final hardware i have 2 separate controllers …. So for that I am trying now in 2 stm32h745ZIQ development boards and taken one one timer for each controller and doing by the Input capture by giving the external connection between 2 boards.​

Hope you are clear now @[Michal Dudka]​ ​. Please give inputs about the configuration to generate one pulse mode correctly or you can give some info about complimentary output based on my above scenario to achieve this.

In Advanced timers like TIM1 …we have an option to select PWM_GENERATION_ CH1 option and ​PWM_GENERATION_ CH1N separately. Can we select one timer of one controller PWM_GENERATION_ CH1 and other timer of 2 nd controller PWM_GENERATION_ CH1N and we can connect by the input capture by giving the external connection between these two boards …. !

Is it possible ?

Can we do like this to achieve my task ?​



Ok if you are using two separated MCUs forgot about one timer with complementary outputs. Use your original way with one-pulse mode timers. Find and adapt example in Cube Firmware Library (from link above).

If your output does not generate pulse there can be multiple mistakes like

  • wrong GPIO configuration
  • Timer output not enabled
  • if using advanced timer, global timer outputs not enabled
  • wrong timer mode
  • timer not run
  • and many others...