Posted on August 17, 2017 at 19:00RCC_HSEConfig(RCC_HSE_ON); becomes RCC_HSEConfig(RCC_HSE_Bypass); and you don't need to wait for it to start
or something along these lines in system_stm32f0xx.c, called via SystemInit()
static void SetSysClock(void)
{
/******************************************************************************/
/* HSE BYPASS used as System clock source */
/******************************************************************************/
/* SYSCLK, HCLK, PCLK configuration ----------------------------------------*/
/* Enable HSE BYPASS */
RCC->CR |= ((uint32_t)RCC_CR_HSEBYP);
/* Enable Prefetch Buffer and set Flash Latency */
FLASH->ACR = FLASH_ACR_PRFTBE | FLASH_ACR_LATENCY;
/* HCLK = SYSCLK */
RCC->CFGR |= (uint32_t)RCC_CFGR_HPRE_DIV1;
/* PCLK = HCLK */
RCC->CFGR |= (uint32_t)RCC_CFGR_PPRE_DIV1;
/* Select HSE as system clock source */
RCC->CFGR = (RCC->CFGR | (uint32_t)((uint32_t)~(RCC_CFGR_SW))) | (uint32_t)RCC_CFGR_SW_HSE;
/* Wait till PLL is used as system clock source */
while ((RCC->CFGR & (uint32_t)RCC_CFGR_SWS) != (uint32_t)RCC_CFGR_SWS_HSE);
}
Tips, Buy me a coffee, or three.. PayPal Venmo (See Profile) Up vote any posts that you find helpful, it shows what's working..