/* Get the current core clock frequency. 
Calculate and get the current core clock frequency based on the current configuration. Assuming that the SystemCoreClock global variable is maintained, the core clock frequency is stored in that variable as well. This function will however calculate the core clock based on actual HW configuration. It will also update the SystemCoreClock global variable. */
uint32_t SystemCoreClockGet(void)
/* Get the current core clock frequency. 
Calculate and get the current core clock frequency based on the current configuration. Assuming that the SystemCoreClock global variable is maintained, the core clock frequency is stored in that variable as well. This function will however calculate the core clock based on actual HW configuration. It will also update the SystemCoreClock global variable. */
uint32_t SystemCoreClockGet(void)
{
  uint32_t ret;
  uint32_t presc;
  ret   = SystemHFClockGet();
  presc = (CMU->HFCOREPRESC & _CMU_HFCOREPRESC_PRESC_MASK)
          >> _CMU_HFCOREPRESC_PRESC_SHIFT;
  ret  /= presc + 1U;
  SystemCoreClock = ret;
  return ret;
}