keil软仿真一直卡在 while((RCU_CTL & RCU_CTL_PLL1STB) == 0U)无法运行到main

在这里插入图片描述

刚开始直接把pll1这段程序屏蔽掉,会进硬件错中断。

软件仿真 不需要用到硬件。

没有硬件,pll1就无法准备就绪。想办法跳过这段

最后把while((RCU_CTL & RCU_CTL_PLL1STB) == 0U)改成
while((RCU_CTL & RCU_CTL_PLL1STB) == 1U),不再等待pll1准备就绪。就可以直接运行到main。
也不会产生硬件错中断。
/
enable PLL1 /
RCU_CTL |= RCU_CTL_PLL1EN;
/
wait till PLL1 is ready /
while((RCU_CTL & RCU_CTL_PLL1STB) == 1U){
}

猜你喜欢

转载自blog.csdn.net/dianqicyuyan/article/details/123369945
RCU
0u
今日推荐