Ask Your Question
1

What is the method of internally triggering the one pulse mode timer in STM32?

asked 2023-05-30 09:58:44 +0000

scrum gravatar image

edit retag flag offensive close merge delete

1 Answer

Sort by ยป oldest newest most voted
3

answered 2023-05-30 10:16:02 +0000

david gravatar image

To internally trigger the one pulse mode timer in STM32, you need to follow these steps:

  1. Enable the timer by setting the clock source and the prescaler value.
  2. Configure the timer mode to the one pulse mode.
  3. Set the auto-reload register to the desired value.
  4. Enable the timer interrupt if needed.
  5. Start the timer.

To trigger the timer internally, you need to use the software start command. This command can be issued in the software by setting the CEN (counter enable) bit in the control register.

Once the timer is triggered, it will count up to the value set in the auto-reload register and generate an interrupt (if enabled). After the interrupt is generated, the counter will stop and the timer will need to be restarted manually.

The one pulse mode timer is useful for generating a single pulse with a specific duration or for generating a pulse train with a fixed repetition rate.

edit flag offensive delete link more

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account. This space is reserved only for answers. If you would like to engage in a discussion, please instead post a comment under the question or an answer that you would like to discuss

Add Answer


Question Tools

Stats

Asked: 2023-05-30 09:58:44 +0000

Seen: 9 times

Last updated: May 30 '23