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/TMS570LS3137: Unable to erase flash on TMS570LS3137

Part Number: TMS570LS3137
Other Parts Discussed in Thread: UNIFLASH

Tool/software: Code Composer Studio

Hello,

I am using TMS570LS3137 for my project. The controller was working fine till now. But now I am unable to erase the flash. The JTAG DR Integrity scan-test is successful using Texas Instruments XDS100v2 USB Debug Probe_0.

But I am getting following error while loading my code:

CortexR4: GEL Output: Memory Map Setup for Flash @ Address 0x0CortexR4: GEL Output: Memory Map Setup for Flash @ Address 0x0 due to System Reset
CortexR4: Trouble Writing Memory Block at 0xfff87008 on Page 0 of Length 0x4: (Error -2130 @ 0xFFF87008) Unable to access device memory. Verify that the memory address is in valid memory. If error persists, confirm configuration, power-cycle board, and/or try more reliable JTAG settings (e.g. lower TCLK). (Emulation package 5.1.641.0)
Dap: Error: (Error -242 @ 0x0) A router subpath could not be accessed. The board configuration file is probably incorrect. (Emulation package 0.0.0.0)
CortexR4: File Loader: Memory write failed: Target failed to write 0xFFF87008
CortexR4: GEL: File: F:\General Share\AT SHARE\AT-DAS-Software final_for I2C\Debug\AT-DAS-Software-Final.out: Load failed.
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 5.1.641.0)

I tried running with slower JTAG CLCK frequency but still getting the same error.

I tried to erase the flash using UniFlash but unsuccessful. I am getting following error:

5/28/2018, 3:29:47 PM] [INFO] CortexR4: GEL Output: Memory Map Setup for Flash @ Address 0x0
[5/28/2018, 3:29:47 PM] [INFO] CortexR4: Erasing Flash memory...
[5/28/2018, 3:29:52 PM] [ERROR] Dap: Error: (Error -242 @ 0x0) A router subpath could not be accessed. The board configuration file is probably incorrect. (Emulation package 7.0.188.0)
[5/28/2018, 3:29:59 PM] [ERROR] CortexR4: Error: (Error -2063 @ 0x0) Unable to reset device. Power-cycle the board. If error persists, confirm configuration and/or try more reliable JTAG settings (e.g. lower TCLK). (Emulation package 7.0.188.0)
[5/28/2018, 3:29:59 PM] [ERROR] 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.188.0)
[5/28/2018, 3:30:05 PM] [ERROR] CortexR4: Unable to determine target status after 20 attempts
[5/28/2018, 3:30:05 PM] [ERROR] 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
  • Hi Pranav,

    Can you paste the contents of your linker command file? Is there any memory section defined that includes the flash module address 0xfff87008?

    It looks like the code executing on the part is repeatedly in an exception handler, which prevents it from entering the debug state. You may have to try multiple times to attempt entry to debug state before the exception state is reached. Try to connect to the part (issue the flash erase command via Uniflash) and then assert system reset via the nRST pin.

    Regards,
    Sunil
  • Dear Sunil,

    My linker command data is as follows:

    MEMORY

    {

       VECTORS (X)  : origin=0x00010100 length=0x00000020

       FLASH0  (RX) : origin=0x00010120 length=0x0016FEE0

       FLASH1  (RX) : origin=0x00180000 length=0x00180000

       STACKS  (RW) : origin=0x08000000 length=0x00001500

       RAM     (RW) : origin=0x08001500 length=0x0003eb00

    }

    SECTIONS

    {

       .intvecs : {} > VECTORS

       .text    : {} > FLASH0 | FLASH1

       .const   : {} > FLASH0 | FLASH1

       .cinit   : {} > FLASH0 | FLASH1

       .TI.crctab {} > FLASH1

       .pinit   : {} > FLASH0 | FLASH1

       .bss     : {} > RAM

       .data    : {} > RAM

    .sysmem  : {} > RAM

    }

  • Dear Sir,

    Please help me out with the DAP memory issue. I have tried everything from several post but still unable to connect XDS100v2 Debug Probe with my TMS570LS3137 controller.

    Thanking you in advance,

    Pranav.

  • Pranav,

    Were you able to erase the part on your kit? This issue occurs when the CPU enters an exception state that prevents it from being able to service the debug exception. You may need to play with the timing of the system reset and the flash erase command in order to get the part to erase successfully.
  • Dear Sunil,

    Thanks for the reply. This solved my problem. I had an external watchdog that used to reset my system. Once I removed the watchdog the problem got resolved.