This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

CCS/TMS570LC4357: "(Error -1170 @ 0x0 Unable to access the DAP." - Tried multiple solutions without success

Part Number: TMS570LC4357
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.

  • I must apologize, as we have solved the problem already.

    We are very excited to say that we have retried connecting to our core by using 1), pressing the on-board Reset button at the same time as the Retry button in the CCS environment. By the 300th time, we were able to connect to the R5 core.

    ¿What happened after that to prevent the DAP error from happening again?


    First
    , we made a Run/Reset/CPU Reset, just in case. This is not going to change much, as our offending code was located in the flash memory.

    Second, we made sure that our HalCoGen generated code integrates a default PLL configuration in order to not repeat the error we experienced. With the generated files, we Clean-Built the CCS project and created the new program, as to be sure that the program has the correct configuration. We also modified the Erase Options under Properties/Debug/Flash Settings/Erase options and we marked Entire Flash. Once this was done, we loaded the new program under Run/Load/Load Program. With these settings, the flash was erased and reprogrammed with our new code and configuration.

    We are now able to reconnect to the board with normality.

    We sincerely apologize if we wasted anybody's time, as we could not predict that 1) was the solution, but required a little bit of luck and more patience.

    Thank you for reading and have a nice day.

  • Julian,

    I am glad you were able to work through the issue using the online resources of the E2E and your own diligence. In regard to the frequency settings, please note that the max frequency for VCLK which drives the peripherals is 110 MHz and the max frequency for GCLK/HCLK from which VCLK is derived is 300 MHz. If you updated the PLL settings to make the PLL output 300MHz (shuold be the default anyway), then you would also need to update the prescalers for the other clocks on the device as well. Nonetheless, you have resolved it so all is good for now.