Skip to content

Conversation

jnohlgard
Copy link
Member

@jnohlgard jnohlgard commented Apr 11, 2016

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

@jnohlgard jnohlgard added Type: enhancement The issue suggests enhanceable parts / The PR enhances parts of the codebase / documentation Platform: ARM Platform: This PR/issue effects ARM-based platforms Area: drivers Area: Device drivers Area: timers Area: timer subsystems labels Apr 11, 2016
@jnohlgard jnohlgard added this to the Release 2016.07 milestone Apr 11, 2016
@jnohlgard jnohlgard force-pushed the pr/kinetis-lptmr-timer-rewrite branch from 9459866 to 97c7c3f Compare April 11, 2016 13:59
@jnohlgard jnohlgard force-pushed the pr/kinetis-lptmr-timer-rewrite branch from 97c7c3f to 87d9402 Compare June 15, 2016 19:49
@jnohlgard jnohlgard force-pushed the pr/kinetis-lptmr-timer-rewrite branch from 87d9402 to 3aef659 Compare June 23, 2016 08:09
@jnohlgard jnohlgard force-pushed the pr/kinetis-lptmr-timer-rewrite branch from 3aef659 to b08d9c6 Compare July 5, 2016 18:15
@jnohlgard
Copy link
Member Author

Rebased on #5607

@jnohlgard jnohlgard force-pushed the pr/kinetis-lptmr-timer-rewrite branch from b08d9c6 to 8dad082 Compare July 7, 2016 11:38
@jnohlgard jnohlgard added the CI: ready for build If set, CI server will compile all applications for all available boards for the labeled PR label Jul 7, 2016
@jnohlgard
Copy link
Member Author

jnohlgard commented Jul 7, 2016

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?

@jnohlgard
Copy link
Member Author

@PeterKietzmann you usually have some hardware around, do you have any Kinetis boards?

@kYc0o
Copy link
Contributor

kYc0o commented Jul 7, 2016

I'm at FU now, so I can have access to one pba-d-01-kw2x, I think is this one?

@jnohlgard
Copy link
Member Author

@kYc0o yes, that should be the one AFAIK

@kYc0o
Copy link
Contributor

kYc0o commented Jul 7, 2016

Great, looking into it.

@jnohlgard
Copy link
Member Author

Thanks!

@OlegHahm OlegHahm assigned kYc0o and jfischer-no and unassigned OlegHahm Jul 7, 2016
@kYc0o
Copy link
Contributor

kYc0o commented Jul 7, 2016

tests/periph_timer works as expected and all xtimer tests passed with impressive results!

@kYc0o
Copy link
Contributor

kYc0o commented Jul 7, 2016

I'm not very familiar with these boards but code looks OK, so I give my ACK ;)

@jnohlgard
Copy link
Member Author

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.
Once we have xtimer working on underlying timers with 32.768 kHz frequency, we will be able to use xtimer to schedule wake ups from power save modes.

@jnohlgard jnohlgard merged commit 3ad29e1 into RIOT-OS:master Jul 7, 2016
@jnohlgard jnohlgard deleted the pr/kinetis-lptmr-timer-rewrite branch July 7, 2016 13:38
@kYc0o
Copy link
Contributor

kYc0o commented Jul 7, 2016

Great! It would be nice to have such capabilities. Looking forward to get #5608 merged too! :D

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Area: drivers Area: Device drivers Area: timers Area: timer subsystems CI: ready for build If set, CI server will compile all applications for all available boards for the labeled PR Platform: ARM Platform: This PR/issue effects ARM-based platforms Type: enhancement The issue suggests enhanceable parts / The PR enhances parts of the codebase / documentation
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants