KSDK CLOCK_SYS_OscInit configuration

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

KSDK CLOCK_SYS_OscInit configuration

跳至解决方案
866 次查看
Edrianocarlos
Contributor IV

Hello.

I am starting to use the KSDk with KL25Z microcontroller.

and reading the sample project i could see that the structure they use for this configuration is this one

    osc_user_config_t osc0Config =     {         .freq                = OSC0_XTAL_FREQ,         .hgo                 = MCG_HGO0,         .range               = MCG_RANGE0,         .erefs               = MCG_EREFS0,         .enableCapacitor2p   = OSC0_SC2P_ENABLE_CONFIG,         .enableCapacitor4p   = OSC0_SC4P_ENABLE_CONFIG,         .enableCapacitor8p   = OSC0_SC8P_ENABLE_CONFIG,         .enableCapacitor16p  = OSC0_SC16P_ENABLE_CONFIG,     };       CLOCK_SYS_OscInit(0U, &osc0Config);

 

but if you look at the SDK reference manual the order is different.

as i am new both are right?

 

    osc_user_config_t osc0Config =     {         .freq                = OSC0_XTAL_FREQ,         .enableCapacitor2p   = OSC0_SC2P_ENABLE_CONFIG,         .enableCapacitor4p   = OSC0_SC4P_ENABLE_CONFIG,         .enableCapacitor8p   = OSC0_SC8P_ENABLE_CONFIG,         .enableCapacitor16p  = OSC0_SC16P_ENABLE_CONFIG,         .hgo                 = MCG_HGO0,         .range               = MCG_RANGE0,         .erefs               = MCG_EREFS0,     };       CLOCK_SYS_OscInit(0U, &osc0Config);
标签 (1)
0 项奖励
回复
1 解答
727 次查看
Alice_Yang
NXP TechSupport
NXP TechSupport

Hello Edri,

They are both ok, the two structures includes the same members ,

there is no matter about the  sequence.

Hope it helps


Have a great day,
Alice Yang

-----------------------------------------------------------------------------------------------------------------------
Note: If this post answers your question, please click the Correct Answer button. Thank you!
-----------------------------------------------------------------------------------------------------------------------

在原帖中查看解决方案

0 项奖励
回复
1 回复
728 次查看
Alice_Yang
NXP TechSupport
NXP TechSupport

Hello Edri,

They are both ok, the two structures includes the same members ,

there is no matter about the  sequence.

Hope it helps


Have a great day,
Alice Yang

-----------------------------------------------------------------------------------------------------------------------
Note: If this post answers your question, please click the Correct Answer button. Thank you!
-----------------------------------------------------------------------------------------------------------------------

0 项奖励
回复