Other Parts Discussed in Thread: UNIFLASH, HALCOGEN
Tool/software: Code Composer Studio
Good day, everbody.
Well, to jump right into it, we are using a Hercules Safety MCU Development, TMS570LC4357, with the CCS7.3 environment. Lately we have been defining basic SCI/LIN interface communications with an external terminal, in conjunction with FreeRTOS. In one of those configuration cycles of the TMS device, we modified the PLL configuration in order to achieve higher working frequency. As far as we know, the default frequency is 75 MHz, and the maximum frequency is 300 MHz for our ARM CortexR5. We upped it to 250 MHz, hoping we would have more timing precision.
So it happened that after applying this configuration, we are unable to reprogram the device. Once we hit Run/Debug, the following error appears:
Dap: 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 7.0.48.0)
After reading the TI forums we have concluded that our MCU flash is handling the latest downloaded program but at a higher frequency with an invalid configuration or executing an instruction that renders us unable to connect. Whenever we connect the TMS570 board and connect a serial port, we can see the D11 LED (XDS100V2 SCI TX) firing. So the program is loaded, but due to an offending instruction, we are unable to connect to the core and erase the flash.
We've seen this problem is not necessarily common, but at least it is known, yet we are not able to properly erase the MCU flash with any of the already described procedures.
¿What solutions have we tried?
1) The most widely recommended solution is opening the target configuration .ccxml file by clicking "Launch Selected Configuration". We then show all cores ad connect to both the Probe/IcePick and Probe/Dap, although the latter requires us to press Reset button in conjuction with the "retry" button (a few hundred times) in our CCS environment. Now, we managed to connect to both. The next (and last) step in this procedure is connecting to the Probe/CortexR5 itself and execute Run/Reset/CPU Reset or erasing the flash memory, hoping that the offending instruction is wiped from the MCU's memory. But we are not able to connect to the core and do such thing (not even hitting Reset on the TMS and Retry in CCS a few hundred times, hoping that we'll connec before the program executes).
2) Using the same procedure as before, we have tried exploring the memory of the TMS via Memory Browser, but we are unable to read the memory as the CCS environment gets overloaded whenever we do so. This means, whenever we open the Memory Browser, the CCS crashes, although not instantly. It takes a while but it does not seem to be possible to read the memory without CCS crashing.
3) We tried erasing the flash using UniFlash, obtaining the same error as shown before. Reading the target's memory using UniFlash has a similar problem as the CCS Memory Browser problem, which is long loading times without being able to read the memory.
4) Ordinary resets, that obviously don't do much good.
Up to this point, we don't know how to unlock our MCU as we are unable to connect to the R5 core. We have seen a few drastical solutions online, but we prefer consulting before doing anything else.
Feel free to recommend or ask about the solutions we have already tried, as up to this point we fear that we might have overlooked something.
Thank you very much for your time.
Have a great day.