AnsweredAssumed Answered

Triggering One Pulse Mode timers from software

Question asked by Audun Knudsrod on Jul 24, 2015
I have been playing around with the STM32F407 for a few days now, learning to set up different timer types and connecting them to each other.

However, most of the examples regard starting timers from external input.

My problem regards real-time hardware control at non-periodic points of time, so I need to be able to say that "time is now A, at time B (B > A) I want timer 1 to generate an event", which will then fire off a set of sequenced one pulse mode timers and then generate an interrupt at the end of the last timer. I can get everything to work except this:

I need that timer 1 to fire off once and then stop. I can probably do this by stopping it in its own interrupt handler, but that seems primitive. Otherwise I could set up timer 1 as a one pulse mode as well but I do not understand how to trigger a timer from software.

So in summary: How to I trigger a timer from software?

An alternate option is to set up a timer to trigger at a certain point in system time, without software (or interrupt) interference at the trigger time. How would I go about doing that?

Outcomes