keil 仿真卡在Wait till HSE is ready and if Time out is reached exit
/* Wait till HSE is ready and if Time out is reached exit */
do
{
HSEStatus = RCC->CR & RCC_CR_HSERDY;
StartUpCounter++;
} while((HSEStatus == 0) && (StartUpCounter != HSE_STARTUP_TIMEOUT));
1、注意是用的软件仿真还是硬件仿真,需要设置对。
2. 在target设置对应的晶振频率。
3. 时钟配置错误,因为已经很久没用标准库了详细配置可以查看相关教程,简单办法直接复制正点原子对应信号单片机的时钟配置文件,一般只用修改外部晶振的值就行。
HAL库就很简单了,直接看外部晶振设置是否正确,其他分频什么的cubemx会自动校正错误的。