AnsweredAssumed Answered

Processor Expert seems not to call Clock Init function in KDS(KSDK)

Question asked by Marco Aurelio P. Coelho on Dec 17, 2015
Latest reply on Dec 18, 2015 by Jorge_Gonzalez



I noticed that Processor Expert doesn't generate a call to Clock System Initialization function inside "hardware_init" function. So, my question is, where is this called? Or it is not called anywhere and I must drag and drop into my code (what wouldn't make any sense to me, since it should be a Processor Expert role)?


When I place the mouse over "HW Initialization", KDS tells me the initialization of clock system is automatic and is performed via CMSIS startup, but where is this startup file, where is the call for a Clock Initialization function?



"hardware_init" and "PEX_components_init" functions are in grey, although "CPU_HARDWARE_INIT" and "PEX_COMPONENTS_INIT" macros are enabled:


The same ocurrs for "Components_Init" function, which doesn't have anything inside it:




void Components_Init(void)






As you can see bellow, "hardware_init" function doesn't call any Clock System Initialization function, what should be the expected.


void hardware_init(void) {



  /* Enable clock for PORTs */




  /* Setup board clock source. */

  g_xtal0ClkFreq = 8000000U;            /* Value of the external crystal or oscillator clock frequency of the system oscillator (OSC) in Hz */

  g_xtalRtcClkFreq = 32768U;            /* Value of the external 32k crystal or oscillator clock frequency of the RTC in Hz */







My Project is using bare metal, KDS and KSDK 1.3.0. And the MCU is MK22FN256.


I tested with a new project with MK22FX512, and the functions, this time, are not in grey, unlike with MK222FN256. But I also can't see any reference to a Clock Initialization function. Should it be a Processor Expert bug?





Marco Coelho

Applications Engineer

Siletec Eletronica