/* Switch system clock configuration in run mode. 
Blocks until the updated configuration takes effect. */
static void rv32m1_switch_sys_clk(const scg_sys_clk_config_t *cfg)
/* Switch system clock configuration in run mode. 
Blocks until the updated configuration takes effect. */
static void rv32m1_switch_sys_clk(const scg_sys_clk_config_t *cfg)
{
	scg_sys_clk_config_t cur_cfg;
	CLOCK_SetRunModeSysClkConfig(cfg);
	do {
		CLOCK_GetCurSysClkConfig(&cur_cfg);
	} while (cur_cfg.src != cfg->src);
}