Page 1 of 1
Time measurement between two ISRs, general idea?
Posted: Mon Jan 14, 2019 9:00 am
by horstman
Hello!
I would like to stop the time (in seconds) with a timer between two differents ISRs.
The first ISR should start, the second should stop the timer.
Could You give me a general idea, which approach would be the best for such a problem?
Thank You!
Horst
Re: Time measurement between two ISRs, general idea?
Posted: Mon Jan 14, 2019 10:39 am
by Giovanni
Hi,
If you need to measure time then use the TM API (Time Measurement), no need to use timers and it is clock cycle accurate.
Giovanni
Re: Time measurement between two ISRs, general idea?
Posted: Thu Jan 17, 2019 5:29 pm
by horstman
Hello,
all right, I will try that out, thank You!
I wonder if You could help me with another issue. (sorry, I'm still a newbie to ChibiOS...)
I would like to implement/enable external interrupt on a button (+ "ISR"/callback-function) with palSetPadCallbackI()/PAL Driver ..., but I am not quite sure which steps are necessary for this. Would it be possible for You to provide a minimal example for this or to tell me, where I can find one? Or would You rather suggest another, better approach?
Thank You very much!
Re: Time measurement between two ISRs, general idea?
Posted: Thu Jan 17, 2019 5:34 pm
by Giovanni
Hi,
In /testhal/STM32/multi/PAL there is the example you need.
Giovanni