_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遇到这样的问题,求分享