kinetis: periph/timer support for LPTMR and PIT (rewritten)#5294
kinetis: periph/timer support for LPTMR and PIT (rewritten)#5294jnohlgard merged 4 commits intoRIOT-OS:masterfrom
Conversation
9459866 to
97c7c3f
Compare
97c7c3f to
87d9402
Compare
87d9402 to
3aef659
Compare
3aef659 to
b08d9c6
Compare
|
Rebased on #5607 |
b08d9c6 to
8dad082
Compare
|
I've been running this for a few days straight on Mulle using the LPTMR as xtimer source (together with #5608). Could someone with a pba-d-01-kw2x or frdm-k64f board run some of the xtimer tests on this PR as a quick check to make sure they still run? |
|
@PeterKietzmann you usually have some hardware around, do you have any Kinetis boards? |
|
I'm at FU now, so I can have access to one pba-d-01-kw2x, I think is this one? |
|
@kYc0o yes, that should be the one AFAIK |
|
Great, looking into it. |
|
Thanks! |
|
|
|
I'm not very familiar with these boards but code looks OK, so I give my ACK ;) |
|
The main point of this PR is to add a driver for the low-power timer (LPTMR) which keeps running and counting during low power modes. The PIT is another hardware timer with greater flexibility and higher possible frequency, and it is currently used for xtimer, but it stops counting whenever the CPU goes to a power save mode, which makes it useless for scheduling wake ups. |
|
Great! It would be nice to have such capabilities. Looking forward to get #5608 merged too! :D |
This is a rewrite of #4065 which cleans up the implementations significantly.
The LPTMR module is a prerequisite in order to keep the xtimer running in low power modes on Kinetis.
This PR adds support for both PIT and LPTMR hardware modules in the configuration, but keeps the old behaviour of using the PIT module for the underlying timer in xtimer.
A future PR will improve the xtimer to support 32768 Hz timers to let the LPTMR act as underlying timer for xtimer, but I would like to get the hardware device driver support in first.
Based on #5607