AnsweredAssumed Answered

KSDK CLOCK_SYS_OscInit configuration

Question asked by Edriano Araujo on Feb 18, 2016
Latest reply on Feb 19, 2016 by Alice_Yang

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);

Outcomes