GPT question

ChibiOS public support forum for all topics not covered by a specific support forum.

Moderators: RoccoMarco, lbednarz, tfAteba

Post Reply
jscott
Posts: 129
Joined: Tue Jul 03, 2012 3:50 pm

GPT question

Post 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
User avatar
Giovanni
Site Admin
Posts: 14895
Joined: Wed May 27, 2009 8:48 am
Has thanked: 1202 times
Been thanked: 997 times

Re: GPT question

Post 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
Post Reply