/* Update SystemCoreClock variable based on current clock settings.  */
void SystemCoreClockUpdate(void)
/* Update SystemCoreClock variable based on current clock settings.  */
void SystemCoreClockUpdate(void)
{
    uint32_t clock_index = R_SYSTEM->SCKSCR;
    SystemCoreClock = g_clock_freq[clock_index] >> R_SYSTEM->SCKDIVCR_b.ICK;
}