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.

TMS570LS0714: Unable to flash code to the micro-controller

Part Number: TMS570LS0714
Other Parts Discussed in Thread: HALCOGEN

Hi,

  We are facing a strange issue in our TMS570LS0714 customized board. In our board, we are using XDS110 USB debug probe to flash the program. Here, before flashing any code, the connection between JTAG and Debugger is getting established. However, when we flash the code for the first time, we get the following errors:

CortexR4: GEL Output:     Memory Map Setup for Flash @ Address 0x0CortexR4: GEL Output:        Memory Map Setup for Flash @ Address 0x0 due to System Reset

CortexR4: GEL Output:     Memory Map Setup for Flash @ Address 0x0 due to System Reset

CortexR4: Can't Run Target CPU: (Error -242 @ 0x0) A router subpath could not be accessed. The board configuration file is probably incorrect. (Emulation package 7.0.100.0)

CortexR4: Trouble Halting Target CPU: (Error -2064 @ 0x0) Unable to read device status. 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.100.0)

CortexR4: 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 7.0.100.0)

.......

.......

.......

CortexR4: Unable to determine target status after 20 attempts

CortexR4: Failed to remove the debug state from the target before disconnecting.  There may still be breakpoint op-codes embedded in program memory.  It is recommended that you reset the emulator before you connect and reload your program before you continue debugging

IcePick: Error connecting to the target: (Error -2131 @ 0x0) Unable to access device register. 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.100.0)

IcePick: Error connecting to the target: (Error -2131 @ 0x0) Unable to access device register. 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.100.0)

Immediately after this, we have noticed that the microcontroller goes to continuous reset mode. That is, the attached waveform is being observed for the voltage at nRst pin.

Furthermore, the connection between JTAG and Debugger is not getting established after the first attempt. 

We have tried to flash a different microcontroller board with different code, but, we are still facing the same issue. 

I request you to suggest some solution for the above problem. 

Eagerly looking forward to your reply. 

Thank you.

Regards,

Krunal

  • Hi Krunal,

    It seems to me that you programmed the flash successfully for the first time, and after you executed the code, you got this strange issue.
    1. Can I know your device initialization sequence?
    2. Can I have the external circuitry for JTAG nTRST, nRST, TEST, nPORRST?
    3. Did you enable the watdog and timer interrupt in your code?
  • 0844.Addition.zip6283.zip3808.GANAPATI.zip0602.Schemtics.pdfHi wang,

                     Due to network issue, Three programming files are not attached and schematics.pdf are not attached.  I am attaching all four file now.

  • Hi Wang,

    Thank you so much for the prompt response. I would like to clarify that the test connection from the debugger and controller was successful, and we pressed the debug button to flash the program and to execute the code. However, the moment we pressed the debug button, the run button disappeared as shown in the below figure. Further, the program that was flashed into the controller was not executed. We are saying this because when we flashed the led blink program, there was no output from the GPIO pin. 

    1. I am attaching 3 different program which we used to programmed to microcontroller. In the first program we initialized RTI and GPIO through Halcogen, in the second program we had initialized GPIO, RTI, CAN etc. However, in the third program there is no initialization as it is a simple program to add two numbers.  But, for all the three programs (burned in three different boards), the controller went to continuous reset mode.  

    2. Kindly find the schematics of the requested circuitry attached with this post. The file name is schematics.pdf. 

    3. In the first two programs, we enabled only timer interrupt. In the 3rd program we did not enable any interrupt.

    Hope I have answered your quires. Kindly let me know if you need any further information. 

    Thank you so much for your help. 

    Regards, 

    Krunal

  • Hello,

    Can you please remove R148 and do the test again? The RESET might be caused by error of ESM group 2 or group 3.

    BTW, Q2 is not needed. You can connect 2MCU_nTRST to MCU_TRSTn directly.
  • Dear wang,

    Thank you again for quick reply.Sure,we can try by removing R148. But as you mentioned,Q2 is not required in one of the boards we had shorted Q2(i.e. we connected 2MCU_nTRST to MCU_TRSTn directly). But despite doing this change,the controller went to continuous reset after flashing the code for the first time. So do you still recommended removing R148?

    Another questions i have is, how to bring the controller from continuous reset mode to normal mode? 

    Is there any method?

    Thank you again for the help.

    Regards,

    Krunal Desai

  • Hello,

    Removing Q2 doesn't affect the code running inside the MCU. Q2 is used for MCU revA silicon which has a HW bug related to JTAG nTRST. This bug has been fixed, so Q2 is not required.

    After you removing R148, the code error will not be able to reset the MCU through the power supervisor. Then you can add breakpoints to debug your code.
  • Dear Wang,
    Thank you so much for your suggestion and reply. We removed R148, and our issue has been resolved.

    Is it possible for you to justify this problem. I am still clueless why removing R148 resolved our problem.

    Thank you so much once again.

    Regards,
    Krunal