Hello Johann,

I am developing for the K60 which has the same timer set up as the KW2x.
The solution that I decided to go for is to let the LPTMR run at 32768
Hz and let the hwtimer use that one. It will not allow for 1 µs
precision, but at least it will be able to wake the MCU from STOP modes.
I have not yet made a PR from my work, but you can see the current WIP
state at https://github.com/gebart/RIOT, mulle branch.

Would there be any interest in merging the K60 and the KW2x peripherals
into a single Kinetis port?

See also some earlier threads regarding the Kinetis timers:

http://lists.riot-os.org/pipermail/devel/2014-November/001426.html
http://lists.riot-os.org/pipermail/devel/2014-October/001219.html
http://lists.riot-os.org/pipermail/devel/2014-September/001086.html

Best regards,

Joakim Gebart
Eistec AB
www.eistec.se 

On 12/12/2014 11:14 AM, Johann Fischer wrote:
> Hello RIOTers,
>
> I tried to implement a hwtimer for MKW2xDxxx and failed.
>
> The MCU has 4 downcounter PIT(Periodic Interrupt Timmer) 32-bit timers,
> PITs can be cascaded so that timer[0] acts as prescaler for timer[1].
> PIT can be loaded with a start value. The timer will count down and
> generate an interrupt at 0. Then the start value will be reloaded and
> it will repeating. PITs can not run in low power modes.
> Apart from the fact that it is a down counter, the timer do not work in
> low power mode, and that bothers me.
>
> The MCU has also one Low-Power
> Timer. This one is a upcounter 16-bit timer with compare register and
> can be configured as as Free-Running Counter (reset on overflow not on
> compare match). Also LPTMR can run in (very) low power modes.
> I tried to implement the hwtimer with LPTMR.
> The implementation divided (or multiply) the tick-values by 1000 and run
> the timer with 1kHz. But this does not work reliable.
>
> There is also a RTC module, but it fits even less for the hwtimer.
>
> Ideas?
>
> Regards,
> Johann Fischer
> _______________________________________________
> devel mailing list
> [email protected]
> http://lists.riot-os.org/mailman/listinfo/devel

_______________________________________________
devel mailing list
[email protected]
http://lists.riot-os.org/mailman/listinfo/devel

Reply via email to