Example #1
0
/***********************************************************************************
* @fn          halMcuInit
*
* @brief       Set Main Clock source to XOSC
*
* @param       none
*
* @return      none
*/
void halMcuInit(void)
{
	// if 32k clock change fails, set system clock to HF RC and try again
	if(clockSelect32k(CLOCK_32K_XTAL) != SUCCESS)
	{
		clockSetMainSrc(CLOCK_SRC_HFRC);
		if(clockSelect32k(CLOCK_32K_XTAL) != SUCCESS)
		{
			halLedSet(1);
			halLedSet(2);
//			HAL_ASSERT(FALSE);
		}
	}
	clockSetMainSrc(CLOCK_SRC_XOSC);
}
Example #2
0
/***********************************************************************************
* @fn          halMcuInit
*
* @brief       Set system clock
*
* @param       none
*
* @return      none
*/
void halMcuInit(void)
{
    clockSetMainSrc(CLOCK_SRC_XOSC);
}