本帖最后由 Hoseatec 于 2022-8-6 09:24 编辑
因为Keil评估版编译有大小限制的问题,不得不使用其它的IDE,于是使用SEGGER Embedded Studio for ARM,芯片HC32F460KEUA,之前Keil下载更新调试都很正常,但是使用Embedded Studio后开始还可以没什么问题,但是昨天下载后,芯片无法启动,也不能再次下载,报错如下:
- Start of erasing sectors
- CPU could not be halted
- ERROR: Cannot read register 15 (R15) while CPU is running
- ERROR: Cannot read register 16 (XPSR) while CPU is running
- ERROR: Cannot read register 13 (R13) while CPU is running
- ERROR: Timeout while preparing target, core does not stop. (PC = 0x00000000, XPSR = 0x00000000, SP = 0x00000000)!
- ERROR: Failed to initialize RAMCode
- Erasing range 0x00000000 - 0x00001FFF ( 1 Sector, 8 KB)
- ERROR: Cannot read register 20 (CFBP) while CPU is running
- ERROR: CPU is not halted
- CPU could not be halted
- ERROR: Cannot read register 15 (R15) while CPU is running
- ERROR: Cannot read register 16 (XPSR) while CPU is running
- ERROR: Cannot read register 13 (R13) while CPU is running
- ERROR: Timeout while erasing sectors, core does not stop. (PC = 0x00000000, XPSR = 0x00000000, SP = 0x00000000)!
- ERROR: Failed to erase sectors.
- End of erasing sectors
- ERROR: Erase failed
- Start of restoring
- End of restoring
- ERROR: Failed to auto program target
更换芯片后,第一次下载可以通过,也可以正常执行,但是断电重启,问题依旧。
然后使用例子efm_simple下载到RAM中执行,程序总是在EFM_SectorErase处跑飞了。
|