Skip to main content
Graduate
January 16, 2025
Question

STM32 TIMer controlled pin output

  • January 16, 2025
  • 1 reply
  • 618 views

Hey folks,

I need assistance with resetting an Analog Devices ADC. I need to generate high output for 1000 or 4000 ns from my Nucleo F401RE board.

As shown in the attached image, I need to set the pin low, then high for a specific duration, and then low again. I tried using TIM4 with Output Compare CH1 and One Pulse Mode, as well as other modes, but it does not seem to provide the required low-high-low sequence. At least, I was unable to achieve this.

I had slightly more success with PWM generation on CH1, where the curve appears correct, but it is repetitive. However I can stop the timer but the goes high again.

Could someone with relevant experience provide a roadmap? Any advice would be greatly appreciated.

Thanks!

    This topic has been closed for replies.

    1 reply

    Technical Moderator
    January 21, 2025

    Hello @Valkan Pavlov 

    Please refer to the example Projects/STM32446E_EVAL/Examples/TIM/TIM_OnePulse to generate one pule signal. 

    This example shows how to use the TIM peripheral to generate a single pulse when a rising edge of an external signal is received on the timer Input pin.