AnsweredAssumed Answered

OSCERCLK as LPTMR0 Source on FRDM-KW41Z

Question asked by aaronledger on Jan 10, 2017

Using the 1.0.2 connectivity software release with FRDM-KW41Z, I am attempting to utilize the OSCERCLK as the source for LPTMR0 using the lptmr driver example provided in the connectivity software in the path MKW41Z_ConnSw_1.0.2/boards/frdmkw41z/driver_examples/lptmr. I can successfully run the driver examples with all clock sources except OSCERCLK by changing lptmrConfig.prescalerClockSource before calling the LPTMR_Init. The reference manual states that OSCERCLK is a valid source, however, when choosing the source by setting lptmrConfig.prescalerClockSource = kLPTMR_PrescalerClock_3, the interrupt in the example code never occurs. Any idea what is causing this clock source not to work properly in the example?

 

For reference, attached is the full lptmr.c code with modification for OSCERCLK source for the LPTMR0_PSR[PCS] bits.

Original Attachment has been moved to: lptmr.c.zip

Outcomes