Page 1 of 1

GPT question

Posted: Wed Nov 14, 2012 10:26 pm
by jscott
I am writing a short article on practical use of the HAL GPT.

It looks like the number of GPTs you can have is directly related to the available hardware timers on a particular processor. Is that correct?

Anyone have any other tips and tricks they would like to share about the GPT?

Thanks!!!
-John
www.atl123.com

Re: GPT question

Posted: Wed Nov 14, 2012 10:33 pm
by Giovanni
Hi,

Correct, there is one GPT instance for each (supported) driver present in the MCU. There is not much to say about the GPT driver except it is probably the simplest and one of the most useful drivers in HAL.
The typical application are:
- Accurate delays.
- Delayed tasks.
- Periodic tasks (without a dedicated thread).

A good example of the GPT driver use are the various "IRQ Storm" demos.

Giovanni