KSDK CLOCK_SYS_OscInit configuration

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

KSDK CLOCK_SYS_OscInit configuration

Jump to solution
412 Views
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);
Labels (1)
0 Kudos
1 Solution
273 Views
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!
-----------------------------------------------------------------------------------------------------------------------

View solution in original post

0 Kudos
1 Reply
274 Views
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 Kudos