Skip to main content
Sm.2
Associate III
June 5, 2022
Question

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

  • June 5, 2022
  • 1 reply
  • 1785 views

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

sm.

    This topic has been closed for replies.

    1 reply

    Michal Dudka
    Lead
    June 5, 2022

    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:

    https://www.st.com/resource/en/reference_manual/rm0399-stm32h745755-and-stm32h747757-advanced-armbased-32bit-mcus-stmicroelectronics.pdf

    Sm.2
    Sm.2Author
    Associate III
    June 5, 2022

    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.

    Regards

    Sm.

    Michal Dudka
    Lead
    June 5, 2022

    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".

    https://github.com/STMicroelectronics/STM32CubeH7/tree/master/Projects/STM32H743I-EVAL/Examples/TIM