
如果下框填写错误,即使可以成功进入仿真界面,但是当你调试的时候,仍然会抛出错误提示:
*** error 65: access violation at 0x40021000 : no 'read' permission
原因可以参考:http://www.360doc.com/content/16/0927/10/36736672_594070041.shtml
- 点击debug中的start开始仿真,这里以初始化串口1为例在uart1_init(72,115200)函数前设置PC指针指向当前位置,点击“执行到函数中”的功能按钮。如图

(tip:右击选择set PC设置指针)
- 接着,选择Peripherals -> USART -> USART1 菜单项,即可以看见串口1为初始化前的情况,在仿真中不断点击
,就可以对比前后每一个步骤初始化的结果。

串口1初始化前后对比
初始化完毕之后发现效果和设想的一致,说明程序正确运行,即串口1的初始化工作没有错误。
|