Is it possible on the KL03 to drive the LPTimer at greater than 8 Mhz using the internal reference clock?

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Is it possible on the KL03 to drive the LPTimer at greater than 8 Mhz using the internal reference clock?

Jump to solution
601 Views
chucksmith
Contributor II

The datasheet says max LPTmr frequency is 24 Mhz. The reference guide says LPTmr can be driven from the "internal reference clock". The MCG_Lite can be configured for a 48 Mhz high frequency internal reference clock. But I don't see how to set the mcglite parameters to produce more than an 8 Mhz clock for the LPTmr. Currently I have:

 

    const mcglite_config_t mcgliteConfig = {
        .outSrc = kMCGLITE_ClkSrcHirc,
        .irclkEnableMode = kMCGLITE_IrclkEnable, 
        .ircs = kMCGLITE_Lirc8M,
        .fcrdiv = kMCGLITE_LircDivBy1,
        .lircDiv2 = kMCGLITE_LircDivBy1,
        .hircEnableInNotHircMode = true,
    };

When I call CLOCK_GetFreq(kCLOCK_McgInternalRefClk), I get 8 Mhz, which the LPTmr does seem to be clocking at.

 

Thanks,

 

Chuck

  
   

Labels (1)
1 Solution
481 Views
pavel_krenek
NXP Employee
NXP Employee

Hi Chuck,

 

it is not possible to clock the LPTMR higher frequency than 8 MHz if you are using internal oscillator. Clock module MCG Lite does not include FLL part and 8 MHz is maximum possible for this peripheral. But as you mentioned  LPTMR can run on 24 MHz but with using external reference (OSCERCLK).

Best regards,

Pavel

View solution in original post

2 Replies
481 Views
chucksmith
Contributor II

Thanks Pavel!

482 Views
pavel_krenek
NXP Employee
NXP Employee

Hi Chuck,

 

it is not possible to clock the LPTMR higher frequency than 8 MHz if you are using internal oscillator. Clock module MCG Lite does not include FLL part and 8 MHz is maximum possible for this peripheral. But as you mentioned  LPTMR can run on 24 MHz but with using external reference (OSCERCLK).

Best regards,

Pavel