STM32F042
时钟配置错误导致调试口下载不了flash了,还有救吗?
// Select system clock source
RCC->CFGR &= (uint32_t)((uint32_t)~(RCC_CFGR_SW));
RCC->CFGR |= (uint32_t)RCC_CFGR_SW_HSE;//RCC_CFGR_SW_PLL;
//Wait system clock source
while ((RCC->CFGR & (uint32_t)RCC_CFGR_SWS) != (uint32_t)RCC_CFGR_SW_HSE)
{
}
|