On my KL27Z, I have configured LPTMR0 to source its clock from kLPTMR_PrescalerClock_0 (which is MCGIRCLK, right?) like this:
lptmrConfig.prescalerClockSource = kLPTMR_PrescalerClock_0; // MCGIRCLK?
What is the correct way to find its frequency? I could do something like this:
uint64_t clock_freq_in_hz = CLOCK_GetFreq(kCLOCK_McgInternalRefClk);
... but I'm not sure that kCLOCK_McgInternalRefClk is the right constant (though empirically it appears to be correct). Is there a more dependable way to get the LPTMR's clock frequency, perhaps one that uses the actual state of its configuration registers?