/* Configure the external 32KHz oscillator clock failure detect. 
Configures the external 32KHz oscillator clock failure detect with the given configuration settings. */
static void system_clock_source_xosc32k_set_failure_detect(struct system_clock_failure_detect *const config)
/* Configure the external 32KHz oscillator clock failure detect. 
Configures the external 32KHz oscillator clock failure detect with the given configuration settings. */
static void system_clock_source_xosc32k_set_failure_detect(struct system_clock_failure_detect *const config)
{
	if (config->cfd_enable) {
		OSC32KCTRL->CFDCTRL.reg |=  OSC32KCTRL_CFDCTRL_CFDEN;
		OSC32KCTRL->CFDCTRL.bit.CFDPRESC = config->cfd_divider;
		OSC32KCTRL->EVCTRL.reg = OSC32KCTRL_EVCTRL_CFDEO;
	} else {
		OSC32KCTRL->CFDCTRL.reg &= ~OSC32KCTRL_CFDCTRL_CFDEN;
	}
}