/* Switch slow clock source selection to external 32k (Xtal or Bypass) oscillator. This function disables the PLLs.  */
void supc_switch_sclk_to_32kxtal(Supc *p_supc, uint32_t ul_bypass)
/* Switch slow clock source selection to external 32k (Xtal or Bypass) oscillator. This function disables the PLLs.  */
void supc_switch_sclk_to_32kxtal(Supc *p_supc, uint32_t ul_bypass)
{
	if (ul_bypass == 1) {
		p_supc->SUPC_MR |= SUPC_MR_KEY_PASSWD | SUPC_MR_OSCBYPASS;
	} else {
		p_supc->SUPC_MR &= ~(SUPC_MR_KEY_PASSWD | SUPC_MR_OSCBYPASS);
	}
	p_supc->SUPC_CR |= SUPC_CR_KEY_PASSWD | SUPC_CR_XTALSEL;
}