Skip to main content
ZKURT.1
Senior
December 17, 2021
Question

timer with STM32L010c6tx (mikroseconds)

  • December 17, 2021
  • 2 replies
  • 1115 views

I am using STM32L010c6tx processor I need Microseconds function. How can I do it using a timer? https://www.youtube.com/watch?v=SqC0IhLKJ9o&ab_channel=ControllersTech I did as it shows in the video but the program didn't work. Most likely APB2, prescaler, counter mode etc. I have an error in the values. How do I write those values?

This topic has been closed for replies.

2 replies

Tesla DeLorean
Guru
December 17, 2021

Sorry not watching videos.

Set TIM ARR to maximal, 0xFFFF

Set TIM PSC to MHZ-1 for APB TIM is on.

CNT will tick in 1us increments, counts 0 thru 0xFFFF

Can't​ interrupt at this high a rate.

Tips, Buy me a coffee, or three.. PayPal Venmo (See Profile) Up vote any posts that you find helpful, it shows what's working..
TDK
December 17, 2021

Related/duplicate:

https://community.st.com/s/question/0D53W00001FojBhSAJ/there-is-no-dwt-in-the-m0m0-kernel

It's okay to wait more than 8 hours for a response instead of starting a new thread.

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