how to init clock with mk02

取消
显示结果 
显示  仅  | 搜索替代 
您的意思是: 
已解决

how to init clock with mk02

跳至解决方案
905 次查看
jackxu
Contributor III

pastedImage_1.png

pastedImage_2.png

pastedImage_3.png

pastedImage_7.png

Hi there,

what i can set about the "fllStableDelay"

CLOCK_BootToFeeMode(g_defaultClockConfigRun.mcgConfig.oscsel, g_defaultClockConfigRun.mcgConfig.frdiv,
g_defaultClockConfigRun.mcgConfig.dmx32, g_defaultClockConfigRun.mcgConfig.drs,fllStableDelay);

Thanks in advance!

-Jack

1 解答
710 次查看
isaacavila
NXP Employee
NXP Employee

Hello Jack,

This pointer to function passes a delay function that will be executed after FLL is configured, this is done to make sure that FLL is stable after/during clock transition. If you do not want to execute any delay function, you can pass NULL pointer.

On the other hand, if you want to execute one delay function, you can use the CLOCK_FllStableDelay function as reference. This function waits for 1 ms aproximately.

static void CLOCK_FllStableDelay(void)
{
    /*
       Should wait at least 1ms. Because in these modes, the core clock is 100MHz
       at most, so this function could obtain the 1ms delay.
     */
    volatile uint32_t i = 30000U;
    while (i--)
    {
        __NOP();
    }
}

I hope this can help you!

Best Regards,

Isaac

在原帖中查看解决方案

1 回复
711 次查看
isaacavila
NXP Employee
NXP Employee

Hello Jack,

This pointer to function passes a delay function that will be executed after FLL is configured, this is done to make sure that FLL is stable after/during clock transition. If you do not want to execute any delay function, you can pass NULL pointer.

On the other hand, if you want to execute one delay function, you can use the CLOCK_FllStableDelay function as reference. This function waits for 1 ms aproximately.

static void CLOCK_FllStableDelay(void)
{
    /*
       Should wait at least 1ms. Because in these modes, the core clock is 100MHz
       at most, so this function could obtain the 1ms delay.
     */
    volatile uint32_t i = 30000U;
    while (i--)
    {
        __NOP();
    }
}

I hope this can help you!

Best Regards,

Isaac