Kinetis Timer

Periodic Interrupt Timer (PIT) and Low-Power Timer (LPTMR) driver.

The PIT is a count down timer, in order to use it with riot-os a count up timer will be simulated. The PIT has four channels, each two channels are cascaded. The n-1 channel is a prescaler and the n channel a down counter. In standard configuration with four channels, two simulated count up timer are possible.

To counteract the effects of the asynchronous operation of the LPTMR, this driver uses the RTT as a time base which the LPTMR is referenced against. This method reduces the timing jitter caused by mixing the clock domains of the bus clock used by the CPU and the 32kHz reference clock for the LPTMR counter.

Timer configuration example (for periph_conf.h)