/* Initializes the GCLK driver. 
Initializes the Generic Clock module, disabling and resetting all active Generic Clock Generators and Channels to their power-on default values.  */
void system_gclk_init(void)
/* Initializes the GCLK driver. 
Initializes the Generic Clock module, disabling and resetting all active Generic Clock Generators and Channels to their power-on default values.  */
void system_gclk_init(void)
{
	system_apb_clock_set_mask(SYSTEM_CLOCK_APB_APBA, PM_APBAMASK_GCLK);
	GCLK->CTRL.reg = GCLK_CTRL_SWRST;
	while (GCLK->CTRL.reg & GCLK_CTRL_SWRST) {
	}
}