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.

LP-EM-CC2340R5: Unable to program CC2340 device via XDS110 debugger

Part Number: LP-EM-CC2340R5
Other Parts Discussed in Thread: LP-XDS110, , CC2340R5, UNIFLASH

I recently received a LP-EM-CC2340R5 and LP-XDS110 to evaluate the performance of the CC2340R5. I have followed the install and bringup instructions in software-dl.ti.com/.../quickstart-intro-cc23xx.html but I'm having issues connecting to the device and flashing new firmware in the 'Flash the device' section.
When attempting to connect to the device using the default target settings I get the following message:

Error connecting to the target:
(Error -615 @ 0x0)
The target failed to see a correctly formatted SWD header. The
connection to the target may be unreliable. Try lowering the
TCLK setting before trying again.
(Emulation package 9.11.0.00128)

I've tried modifying the TCLK speed with no success, but I am able to get slightly further by enabling the 'Apply pin reset' option in the XDS110 settings within the target configuration. When I do this it gets partway through programming before I get an error:

Cortex_M0P: Flash loader: CC23xx_FLASH_LIBRARY_VERSION 3.17.09.20
Cortex_M0P: GEL Output: Memory Map Initialization Complete.
Cortex_M0P: Updating CRC32 field ccfg.bootCfg.crc32 @ address 0x4E02000C, based on data in the range [04E020000, 0x4E02000B]. Value changes from 0x00000000 to 0xFFFFFFFF
Cortex_M0P: Updating CRC32 field ccfg.crc32 @ address 0x4E02074C, based on data in the range [04E020010, 0x4E02074B]. Value changes from 0x00000000 to 0xA8B22962
Cortex_M0P: Updating CRC32 field ccfg.userRecord.crc32 @ address 0x4E0207CC, based on data in the range [04E020750, 0x4E0207CB]. Value changes from 0x00000000 to 0x15D70E0C
Cortex_M0P: Updating CRC32 field ccfg.debugCfg.crc32 @ address 0x4E0207FC, based on data in the range [04E0207D0, 0x4E0207FB]. Value changes from 0x00000000 to 0x527294A2
Cortex_M0P: GEL: Error while executing OnRestart( 0 ): Could not read 0x40000034: target is not connected
at ('REG'::PMCTL_BOOTSTA==0x80) [cc23xx_xds.gel:99]
at OnRestart(0)
Cortex_M0P: AutoRun: Unable to run the target at this time
Cortex_M0P: Breakpoint Manager: One or more breakpoints will not relocate to new symbolic locations until the target halts.
Cortex_M0P: AutoRun: Target not run as breakpoint could not be set: Cannot enable while the target is disconnected

I have tried using a different XDS110 probe and a different CC2340 and had exactly same behaviour.

I'm not sure of any further steps I can take to debug this issue, I would appreciate advice on how to resolve this.

(I am using CCS v12.3.0.00005, SimpleLink Low Power F3 SDK v7.10.00.35, XDS110 firmware v3.0.0.25)

  • Hi Joe,

    Could you verify which PG version of the CC2340 you have by using SmartRF Studio 8.0.0.6 and seeing if it is able to detect your board (fresh board preferably)?

    We typically see this issue if the wrong version of the code/image is loaded into the wrong silicon PG.

    Best regards,

    Bun

  • Hi Joe,

    Here is an online version link of the document you are referring to.  Along with Bun's reply, only revision b (PG2.0) is intended for SIMPLELINK-LOWPOWER-F3-SDK 

    Otherwise, the issue could be a faulty connection to the XDS110.  This would be surprising if you have used different LP-XDS110 and LP-EM-CC2340R5 hardware.  Are you using the LP-XDS110 Quick Start Guide as a reference to connect the LP-EM-CC2340R5?

    Regards,
    Ryan

  • The Tools Team has confirmed that the issue is most likely because debug access is disabled (inside ccfg) in the flashed program.  This would be caused by a hardware/software mismatch as described earlier (i.e. RevA/PG1 SDK example on RevB/PG2 board or RevA/PG1 ccfg in an RevB/PG2 example and flashed on RevB/PG2 board.

    There is no way to unlock from CCS or Uniflash. This is by design, as the debug interface is supposed to be closed permanently if selected by the developer.  This was not enabled in RevA/PG1. Here is a script for customers to recover from this situation.

    unblock_loki_low_plus_pg2.gel

    1. Launch a project-less debug session with a target configuration file in ‘Target Configurations’ window (View -> Target Configurations).
    2. Right click the Cortex core in debug window (View -> Debug) and select ‘Show all cores’.
    3. Right click the DAP core and select ‘Open GEL Files View’.
    4. Right click in ‘GEL Files (CS_DAP)’ window and load the `unblock_loki_low_plus_pg2.gel` script.
      1. Please ensure the status of the gel script is Success after loading it.
    5. Select the DAP core and run the gel function ‘UnblockLokiLowPlusPG2’ (Scripts -> CC23XX).

    To flash a program on a blank device using Uniflash CLI, below command can be used. This is will work on Uniflash v8.2 or v8.3.

    dslite --mode noConnectFlash cc23xx-prog-default-ccfg -c ccxml_file_path

    If Uniflash GUI is used for blank device,  device can be directly programmed from GUI without any special test.  On a device with valid CCFG, same old dslite command still works

    dslite flash cc23xx-prog-default-ccfg -c ccxml_file_path 

    Regards,
    Ryan

  • Thankyou Ryan, I can confirm this solved the issue for me.

    I had suspected it was something to do with debug access being locked since it seemed to work temporarily if the XDS110 reset the device just prior to connection.