多语言展示
当前在线:1720今日阅读:100今日分享:18

C8051F310 DEBUG时出现Attmpt has been made..

C8051F310在烧写程序DEBUG时出现Attmpt has been made to access a protected region of flash! A user space erase will be perfermed prior to programing...的解决方法
工具/原料
1

C8051F310最小系统

2

电脑中安装keil3软件

3

C8051F310对应的EC3 USB DEBUG ADAPTER调试器

方法/步骤
1

调试时出现的现象说明:出现error1:Attmpt has been made to access a protected region of flash! A user space erase will be perfermed prior to programingerror2:Failed reading flash,REceive Buffer failureerror3:Flash write command failureerror4:To recoverfrom the previous errors it is recommended that the debug hardware be reset,do you want to reset now?

2

出现上述问题的释义是在DEBUG时程序无法写入FLASH,这与我的调试环境有关。那么问题来了,调试环境是什么情况?

3

当时的调试环境是:利用稳压电源对C8051F310最小系统板供电3.3V,而稳压电源所在的实验桌在随着电泵的运转轻微晃动,在开启电泵,对310 DEBUG时总是出现上述错误,在关闭电泵,重新对310 DEBUG时上述错误消失。。。那么原因来了。

4

错误出现的原因:当开启电泵时,实验桌的轻微高频率晃动导致开关电源的输出电压中夹杂高频的纹波,因此在debug时导致程序无法写入芯片FLASH。正常进入DEBUG后如下图所示:

注意事项
1

对MCU芯片debug调试时,尽量降低输出电源的纹波。

2

在安静的环境中调试

推荐信息