stm32f7 hal库的片内flash编程问题

_void FLASH_Erase_Sector(uint32_t Sector, uint8_t VoltageRange)
{
uint32_t tmp_psize = 0;

assert_param(IS_FLASH_SECTOR(Sector));
assert_param(IS_VOLTAGERANGE(VoltageRange));
..............._
省略
...............
DSB();
}_
运行到
DSB()指令后,jlink调试会停止run,报错如下:

**JLink Warning: CPU could not be halted
**JLink Error: Can not read register 15 (R15) while CPU is running
*
*JLink Error: Can not read register 16 (XPSR) while CPU is running
**JLink Error: Can not read register 0 (R0) while CPU is running
...
省略
...
*
*JLink E_rror: Can not read register 64 (FPS31) while CPU is running
_**

但是如果点击几下run后,调试恢复正常,代码开始全速run。
有没有人用stm32f7+hal操作内部flash遇到这样的问题,求分享

1个回答

Csdn user default icon
上传中...
上传图片
插入图片
抄袭、复制答案,以达到刷声望分或其他目的的行为,在CSDN问答是严格禁止的,一经发现立刻封号。是时候展现真正的技术了!
立即提问