cancel
Showing results for 
Search instead for 
Did you mean: 

how to count time

David.Cheng
Associate II

I want to measure the time from GPIO low level to high in RC circuit,

0690X000009Yr9iQAC.png

how to count the time

use rtc or tim?

3 REPLIES 3

A free running, maximal count, TIM could be use in Input Capture mode. For high precision, long duration, use a 32-bit TIM if available.

SysTick could count off milliseconds. EXTI to interrupt on edges.

Tips, Buy me a coffee, or three.. PayPal Venmo
Up vote any posts that you find helpful, it shows what's working..
David.Cheng
Associate II

got it, if the pin to the low value of high level, then timer should stop, Input Capture mode is ok?

got it, capture is a precise way. if the pin P1.2 just reaches 0.70 x VDD, then timer should stop, Input Capture mode is ok?