Page 1 of 1

GPT - get current value ?

Posted: Sat Jan 07, 2017 5:28 pm
by omcdr
In one external interrupt I'm starting GPT timer by gptStartOneShotI() function, in another one I stop GPT by gptStopTimer().
How to read current ticks(with prescaler) or ticks after stop from GPT timer ? Is there a function for it?

Re: GPT - get current value ?

Posted: Sat Jan 07, 2017 7:49 pm
by Giovanni
Hi,

There is not such a function, the GPT driver does not even define if the internal timer counts up or down. if you need a counter then you could use:

- Virtual timers and system time counter.
- Realtime counter if you need high resolution.

Giovanni