AnsweredAssumed Answered

Can the KEA8 FTM counter clk up to 40Mhz as the syestem clk?

Question asked by 展辉 刘 on Jul 29, 2018
Latest reply on Jul 30, 2018 by Felipe Garcia

Dear NXP engineers:

        I'm debugging the kea8 FTM moudule. The system CLK is 40Mhz, and according to the reference sheet that the FTM counter clk source from system clock.Is that means that the FTM counter clk also up to 40Mhz?

        But according to caculate period of pwm out ,it seems like couter clk just up 20Mhz (the FTM PS ,prescale factor selection is 000,divide by 1).The setting as below.

       

void Clk_Init()

{
           
            ICS->C1|=ICS_C1_IRCLKEN_MASK;              /* Enable the internal reference clock*/ 
            ICS->C1 |= ICS_C1_CLKS(0);
            ICS->C1 |= ICS_C1_IREFS_MASK;
            ICS->C3= 0x90;                                             /* Reference clock frequency = 31.25 KHz*/                     
while(!(ICS->S & ICS_S_LOCK_MASK));  /* Wait for PLL lock, now running at 40 MHz (1280 * 31.25Khz) */                       
            ICS->C2|=ICS_C2_BDIV(0)  ;                 /*BDIV=1.
             SIM->CLKDIV |= SIM_CLKDIV_OUTDIV1(0);
            SIM->CLKDIV &= ~SIM_CLKDIV_OUTDIV3_MASK;
            SIM->CLKDIV |= SIM_CLKDIV_OUTDIV2_MASK;    /*Bus clock = 20 MHz*/

}

 

So my question is if this FTM counter clk can up to 40Mhz like as system clk .?

Outcomes