Skip to main content
oli
Associate III
January 8, 2015
Question

Taking microsecond timer without interrupt

  • January 8, 2015
  • 2 replies
  • 624 views
Posted on January 08, 2015 at 13:29

Hello

I'm looking for a solution to get the time between to input signals in microsecond resolution.

But I do not want to use an interrupt counting up all microseconds.

Is there a convenient solution / method?

#stm32f4
This topic has been closed for replies.

2 replies

AvaTar
Senior III
January 8, 2015
Posted on January 08, 2015 at 13:59

Busy-polling the signal pin, and on change, fetching the counter values from a properly configured timer.

This solution will eat up all available MCU cycles while running (which is usually unacceptable on real-life systems).

Tesla DeLorean
Guru
January 8, 2015
Posted on January 08, 2015 at 14:56

[DEAD LINK /public/STe2ecommunities/mcu/Lists/cortex_mx_stm32/Flat.aspx?RootFolder=/public/STe2ecommunities/mcu/Lists/cortex_mx_stm32/Taking%20time%20in%20microsecond%20without%20using%20interrupts&FolderCTID=0x01200200770978C69A1141439FE559EB459D7580009C4E14902C3CDE46A77F0FFD06506F5B&TopicsView=https://my.st.com/public/STe2ecommunities/mcu/Lists/cortex_mx_stm32/AllItems.aspx&currentviews=9]cross-post

Tips, Buy me a coffee, or three.. PayPal VenmoUp vote any posts that you find helpful, it shows what's working..