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/LAUNCHXL-CC2640R2: New LaunchXL-CC2640R2 can't flash

Part Number: LAUNCHXL-CC2640R2
Other Parts Discussed in Thread: UNIFLASH

Tool/software: Code Composer Studio

Hi,

I just received a LaunchXL-CC2640R2 evaluation board, and fired up CC studio to flash a simple broadcaster demonstration (over USB).  When I went to flash, it told me I had to update the fimrware.  I clicked on OK.  It then immediately did the same thing.  This failed, but I did not capture the log output (sorry). 

So now, when I go to flash, it prints the following:

Cortex_M3_0: GEL Output: Memory Map Initialization Complete.
Cortex_M3_0: GEL Output: Board Reset Complete.
Cortex_M3_0: Target timed out! (Block 0)
Cortex_M3_0:   Status 0xFFFFFFFF: Target flashloader has not returned any status. Unknown error!
Cortex_M3_0:   Command=20 -- addr=0x00001000 -- length=0x00001000
Cortex_M3_0: File Loader: Memory write failed: Timed out waiting for target flashloader to execute command.
Cortex_M3_0: GEL: File: /home/bruce/workspace_v9/ble5_simple_broadcaster_cc2640r2lp_app/FlashROM_StackLibrary/ble5_simple_broadcaster_cc2640r2lp_app.out: Load failed.

The device has clearly been put into flash mode, as it stops its out-of-the-box program, but it isn't responding.

My question is this: How do I fix it? Is there a tool to re-flash the bootloader firmware?  Do I need to use JTAG? 

  • Hello Bruce,

    I have had a similar experience with LAUNCHXL-CC2640R2 boards. 

    I have tried reloading the firmware and bootloader, but that didn't fix the problem.

    I  have found that you can  still probably program the device with UniFlash, and you can debug with CCS as long as you set the debug configuration to load symbols only.

    Another thing I have noticed is if you erase all the flash with UniFlash, you can load a program one time with CCS. But you can't program a second time with CCS. 

    I'd be curious if you can program your board with UniFlash.

    Best regards,

    Steve 

  • Bruce,

    I also have been able to program such board using CCS 9.0.1.00004  and setting the JTAG TCLK frequency to 5.5MHz.

    In CCS  9.1.0.00010 setting the JTAG TCLK frequency doesn't  fix this problem for me.

    Best regards,

    Steve

  • Bruce,

    I replied to rSteve's thread at the link below. Please check if the suggestions there may be able to help you.

    https://e2e.ti.com/support/tools/ccs/f/81/t/831675

    Also, if I understood correctly, Uniflash is spawning two dialog boxes to update the firmware, one after the other, right? 

    This is unfortunately a known issue with the latest CCSv9.1.0 and Uniflash 5.0.0 and is in the bug report CCBT-2457. A rough procedure to workaround this is:

    • Click on the "Update" button only once. Wait until the firmware process finishes, then click on "Cancel" on the second dialog. This should restore the debug session.
    • If the "Update" button is clicked twice, the second time will fail and CCS will return to the CCS Edit perspective. Uniflash may proceed but fail operation.
    • Remove and reinsert the board on the USB port to restore the normal functionality. At this point the firmware should be updated.
    • Relaunch the Debug/Flash session.

    I apologize for the inconvenience,

    Rafael

  • Thaks for replying,

    I have to admit to still being confused.   I downloaded Uniflash  5.1.0.2397, and tried to flash the image built by CCS (v9.1.0.00010).  There were no options in the uniflash ui to change TCLK.  I get the log shown below.  It tells me to try a lower TCLK, but I can't find a way to specify one.  I tried downloading and viewing the ccxml, but there was nothing in it that specified clock speed.  It is detecting the board properly, and it shows the probe as a XDS110.  I can do all the other operations on the board, so it appears the driver is working properly.

    I also tried looking for flash options directly in CCS, but couldn't find them.  This is very confusing.

    22/8/2019 8:45:41 am] [INFO] Cortex_M3_0: GEL Output: Memory Map Initialization Complete.
    [22/8/2019 8:45:41 am] [INFO] Cortex_M3_0: GEL Output: Memory Map Initialization Complete.
    [22/8/2019 8:45:42 am] [INFO] Cortex_M3_0: GEL Output: Board Reset Complete.
    [22/8/2019 8:45:42 am] [ERROR] Cortex_M3_0: Can't Run Target CPU: (Error -2134 @ 0x0) Unable to control device execution state. 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 8.2.0.00004)
    [22/8/2019 8:45:42 am] [ERROR] Cortex_M3_0: 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 8.2.0.00004)
    [22/8/2019 8:45:44 am] [ERROR] Cortex_M3_0: Unable to determine target status after 20 attempts
    [22/8/2019 8:45:44 am] [ERROR] Cortex_M3_0: 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
    [22/8/2019 8:45:44 am] [ERROR] Cortex_M3_0: Failed to write data to temporary buffer in RAM before programming device FLASH memory. addr=0x20000C00, writeLength=4096(0x1000), bufIdx=0 Error: Could not write 0x20000C00: target is not connected
    [22/8/2019 8:45:44 am] [ERROR] Cortex_M3_0: File Loader: Memory write failed: Failed to write data to temporary buffer in RAM before programming device FLASH memory.
  • okay, downgrading to CCS 9.0.1 worked.  It then showed me the firmware update dialog again (it wasn't showing it to me any more in 9.1.0), and i followed the instructions you gave (press update once, wait, cancel second update) and this appears to have worked.  I am now able to flash from CCS.