Skip to main content
Mbb.1
Visitor II
August 3, 2021
Question

STM32F407 software trigger a one pulse timer using HAL library

Hello,

I have a question about STM32F407.

I was wondering how to software trigger (not external trigger) a "one pulse" timer, using HAL library?

Thanks for the help.

This topic has been closed for replies.

2 replies

waclawek.jan
Super User
August 3, 2021

After having set up timer for the one-pulse mode (i.e. set TIMx_CR1.OPM), simply write 1 to TIMx_CR1.CEN.

I don't know if there's a Cube/HAL incantation for it; Cube/HAL is open source, you can look it up yourself.

JW

TDK
August 3, 2021

__HAL_TIM_ENABLE(htimx);

"If you feel a post has answered your question, please click ""Accept as Solution""."