Other Parts Discussed in Thread: CONTROLSUITE
I had a project that was working fine on my Concerto Board. The project was written in C and I just made a few changes to port it to C++. The program compiled successfully and I then loaded the program into RAM to test. I noticed that CCS showed the dialog that says Erasing and Loading FLASH, which was not what I expected when loading into RAM. It also did not finish the load and then just hanged. After this I was Unable to connect to the device at all. I get the following error:
Error connecting to the target:
(Error -1170 @ 0x0)
Unable to access the DAP. Reset the device, and retry the operation. If error persists, confirm configuration, power-cycle the board, and/or try more reliable JTAG settings (e.g. lower TCLK).
(Emulation package 9.3.0.00042)
I tried a few things to see if it was a hardware problem, but eventually tried another board and the exact same thing happened. It seems that something in my program that I loaded had written to the wrong memory space and now locked up the device.
Then I tried to startup the device in "wait in reset" mode by doing the following:
* I enabled halt target on connect.
* Then I press and hold the reset button on my PCB to keep the device in reset.
* Then I try to connect to the target in the debug window, which if I understand correctly will then pull the EMU0 pin to 0 and EMU1 pin to 1 which is required to start up in WIR mode.
* I then release the reset so that the device starts up in WIR mode.
Once I release the reset, it seems that it did connect to the M3 core and show the following in the debug window:
And the console shows:
Cortex_M3_0: GEL Output: Watchdog Timers Enabled
Cortex_M3_0: GEL Output: UARTs Enabled
However, I still cannot load a program. When I try that It only disconnects and the output on the console is the following:
Cortex_M3_0: GEL: Error while executing OnReset(0): Target failed to read 0x00681000
at R1=*(0x681000) [f28m36h33b2_m3.gel:327]
at Read_OTPSECLOCK() [f28m36h33b2_m3.gel:55]
at OnReset(0)
Cortex_M3_0: Breakpoint Manager: Error enabling this function: Target Access Failed
Cortex_M3_0: GEL: Error while executing OnRestart( 0 ): Target failed to read 0x00680430
at *((unsigned long *) 0x400FE004)=*((unsigned long *) 0x00680430) [f28m36h33b2_m3.gel:337]
at Device_Config() [f28m36h33b2_m3.gel:69]
at OnRestart(0)
Cortex_M3_0: Trouble Setting Breakpoint with the Action "Terminate Program Execution" at 0x20018e12: (Error -1170 @ 0x20018E12) Unable to access the DAP. Reset the device, and retry the operation. If error persists, confirm configuration, power-cycle the board, and/or try more reliable JTAG settings (e.g. lower TCLK). (Emulation package 9.3.0.00042)
Cortex_M3_0: Breakpoint Manager: Retrying with a AET breakpoint
Cortex_M3_0: Breakpoint Manager: Error enabling this function: Address exceeds the allowed range
Cortex_M3_0: Trouble Setting Breakpoint with the Action "Finish Auto Run" at 0x20000b20: (Error -1170 @ 0x20000B20) Unable to access the DAP. Reset the device, and retry the operation. If error persists, confirm configuration, power-cycle the board, and/or try more reliable JTAG settings (e.g. lower TCLK). (Emulation package 9.3.0.00042)
Cortex_M3_0: Trouble Removing Breakpoint with the Action "Finish Auto Run" at 0x20000b20: (Error -2044 @ 0x20000B20) Internal error: Requested breakpoint does not exist. Restart the application. If error persists, please report the error. (Emulation package 9.3.0.00042)
Cortex_M3_0: JTAG Communication Error: (Error -1170 @ 0x0) Unable to access the DAP. Reset the device, and retry the operation. If error persists, confirm configuration, power-cycle the board, and/or try more reliable JTAG settings (e.g. lower TCLK). (Emulation package 9.3.0.00042)
I also tried to erase the flash using the on-chip Flash Gui. But it gives the error "Target not connected or does not support current flash operation".
Some posts suggested that the device might me locked, but it does not seem that is the case since the password location are all F's:
I have not changes anything in my linker file from the working version that was written in C.
What in my program that I loaded could have caused this to happen?
Is there a way to manually connect to the device and erase the flash to recover my boards? I have now 3 boards that is lock up in this way.
If it will help I can send the linker file and even the object files and source code with a private message.
Thanks
Albert