cancel
Showing results for 
Search instead for 
Did you mean: 

STM32 TIMer controlled pin output

Valkan Pavlov
Associate III

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!

1 REPLY 1
Saket_Om
ST Employee

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.

To give better visibility on the answered topics, please click on "Accept as Solution" on the reply which solved your issue or answered your question.
Saket_Om