中级会员
 
- 积分
- 361
- 金钱
- 361
- 注册时间
- 2016-11-1
- 在线时间
- 119 小时
|
发表于 2018-1-11 14:21:14
|
显示全部楼层
不行是正常的。引用一下官方文档里的话:
During a write operation to the Flash memory, any attempt to read the Flash memory will
stall the bus. The read operation will proceed correctly once the write operation has
completed. This means that code or data fetches cannot be made while a write/erase
operation is ongoing. 上面那句话在F1系列的Programming manual里,其它系列也有差不多的语句。
总之就是在你擦写FLASH的时候,FLASH上的代码、数据你都读不了,也执行不了,所以你那个FLASH_WaitForLastOperation()函数是要等到它擦写完才能执行的,而你等到它擦写完的时候已经错过了喂狗时间了。
当然,ST的某些芯片有多个BANK,那么如果你要执行的代码不在你要擦写的BANK上,那么那些代码还是可以正常执行的。
|
|