刚开始直接把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){
}