KSDK CLOCK_SYS_OscInit configuration

キャンセル
次の結果を表示 
表示  限定  | 次の代わりに検索 
もしかして: 

KSDK CLOCK_SYS_OscInit configuration

ソリューションへジャンプ
872件の閲覧回数
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 解決策
733件の閲覧回数
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 返信
734件の閲覧回数
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 件の賞賛
返信