AnsweredAssumed Answered

ke0x startup code differences

Question asked by Otavio Borges on Mar 28, 2017
Latest reply on Apr 6, 2017 by Otavio Borges

Hello all,

 

Working with both KE02 and KE04 on KSDK 1.x.x I stumbled on a error on startup code. On "system_MKE02Z2.h" clock configuration read the following:

(...)
#define CPU_XTAL_CLK_HZ 12000000u /* Value of the external crystal or oscillator clock frequency in Hz */
#define CPU_INT_CLK_HZ 32768u /* Value of the internal oscillator clock frequency in Hz */
#define DEFAULT_SYSTEM_CLOCK 40000000u /* Default System clock value */

And then on "system_MKE02Z2.c" the "SystemCoreClockUpdate(void)" method reads the following:

void SystemCoreClockUpdate (void) {

(...)

   } else {
      ICSOUTClock = CPU_INT_CLK_HZ; /* The internal reference clock is selected */
   }
   ICSOUTClock *= 1280u; /* Apply 1280 FLL multiplier */
} else if ((ICS->C1 & ICS_C1_CLKS_MASK) == 0x40u) {

Althought those parameters meet the KE04x sub-family when starting an KE02 project the KDS link the same files but, accordingly to KE02 Reference Manual, the factory trim value for the internal oscillator is 31.250KHz and FLL multiplier is in fact 1024 instead of 1280.

Outcomes