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: Cannot flash/debug LP-EM-CC2340R5 with LP-XDS110ET using CCS or Uniflash

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

LP-EM-CC2340R5 with XDS110ET Debugger

Windows 11 Home x64

CCS v12.3.0

Uniflash v8.3.0

simplelink_lowpower_f3_sdk_7_10_00_35 installed

I have looked at these threads and have not been able to replicate/get these solutions to work:

Post by : ://e2e.ti.com/support/wireless-connectivity/bluetooth-group/bluetooth/f/bluetooth-forum/1224456/lp-em-cc2340r5-unable-to-program-cc2340-device-via-xds110-debugger

Post by https://e2e.ti.com/support/wireless-connectivity/bluetooth-group/bluetooth/f/bluetooth-forum/1177752/neither-ccs-nor-uniflash-are-able-to-connect-to-lp-em-cc2340r5-eval-board

If I try to simply build and debug the example mcuboot_blinky_LP_EM_CC2340R5_nortos_gcc in CCS, I get the following errors:

In the popup:

Error connecting to the target:
(Error -1274 @ 0x0)
Error encountered during connect sequence.  The specific reason is unknown but may be the result of trying to access a Core or logic that is inaccessible due to a lack of Power, Clocks, or Authentication (i.e. Security is preventing).
 If blocked by security, and if supported, access may be allowed after following the Authentication process.
(Emulation package 9.11.0.00128)

In the console:

Cortex_M0P: Flash loader: CC23xx_FLASH_LIBRARY_VERSION 3.17.09.20
Cortex_M0P: Image must contain (correctly sized) CCFG section, when erase type is "Chip erase"
Cortex_M0P: Debugging is not allowed. If this not expected, check your CCFG. 
Cortex_M0P:     Flash loading is currently not supported if debugging is not allowed. 
Cortex_M0P:     If you are experiencing issues with loading your application, do the following (this will erase the chip): 
Cortex_M0P:      - Code Composer Studio: 
Cortex_M0P:        - End the current debug session (if any is active). 
Cortex_M0P:        - View -> Target Configurations -> Right click on .ccxml file for your project -> Launch Selected Configuration. 
Cortex_M0P:        - Run -> Load -> LoadProgram -> Select the program file containing a valid CCFG. 
Cortex_M0P:        - You should now be able to load your application to the target. 
Cortex_M0P:      - UniFlash: 
Cortex_M0P:        - Run the following dslite command: 
Cortex_M0P:          dslite --mode cc23xx-prog-default-ccfg -c [path to your ccxml file] 
Cortex_M0P:        - You should now be able to load your application to the target. 
Cortex_M0P: Halting at entry of application is not allowed. Are you sure debugging is allowed?
Cortex_M0P: Running the application, without halting at the entry of the application.
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: AutoRun: Target not run as breakpoint could not be set: Cannot enable while the target is disconnected
Cortex_M0P: Debugging is not allowed. If this not expected, check your CCFG. 
Cortex_M0P:     Flash loading is currently not supported if debugging is not allowed. 
Cortex_M0P:     If you are experiencing issues with loading your application, do the following (this will erase the chip): 
Cortex_M0P:      - Code Composer Studio: 
Cortex_M0P:        - End the current debug session (if any is active). 
Cortex_M0P:        - View -> Target Configurations -> Right click on .ccxml file for your project -> Launch Selected Configuration. 
Cortex_M0P:        - Run -> Load -> LoadProgram -> Select the program file containing a valid CCFG. 
Cortex_M0P:        - You should now be able to load your application to the target. 
Cortex_M0P:      - UniFlash: 
Cortex_M0P:        - Run the following dslite command: 
Cortex_M0P:          dslite --mode cc23xx-prog-default-ccfg -c [path to your ccxml file] 
Cortex_M0P:        - You should now be able to load your application to the target. 
Cortex_M0P: Halting at entry of application is not allowed. Are you sure debugging is allowed?
Cortex_M0P: Running the application, without halting at the entry of the application.
Cortex_M0P: Error connecting to the target: (Error -1274 @ 0x0) Error encountered during connect sequence.  The specific reason is unknown but may be the result of trying to access a Core or logic that is inaccessible due to a lack of Power, Clocks, or Authentication (i.e. Security is preventing).  If blocked by security, and if supported, access may be allowed after following the Authentication process. (Emulation package 9.11.0.00128)

First off, if I follow the steps written in the console:

Cortex_M0P: Debugging is not allowed. If this not expected, check your CCFG.
Cortex_M0P: Flash loading is currently not supported if debugging is not allowed.
Cortex_M0P: If you are experiencing issues with loading your application, do the following (this will erase the chip):
Cortex_M0P: - Code Composer Studio:
Cortex_M0P: - End the current debug session (if any is active).
Cortex_M0P: - View -> Target Configurations -> Right click on .ccxml file for your project -> Launch Selected Configuration.
Cortex_M0P: - Run -> Load -> LoadProgram -> Select the program file containing a valid CCFG.
Cortex_M0P: - You should now be able to load your application to the target.
Cortex_M0P: - UniFlash:
Cortex_M0P: - Run the following dslite command:
Cortex_M0P: dslite --mode cc23xx-prog-default-ccfg -c [path to your ccxml file]
Cortex_M0P: - You should now be able to load your application to the target.

The "Code Composer Studio" list of steps gives me the exact same console error

The "Uniflash" list of steps doesn't give me any command line errors, but even after using that command, I get the same console/popup errors when trying to debug the program using CCS:

c:\TI\uniflash_8.3.0>dslite --mode cc23xx-prog-default-ccfg -c C:\TI\Workspaces\WS2\mcuboot_blinky_LP_EM_CC2340R5_nortos_gcc\targetConfigs\CC2340R5.ccxml
Executing the following command:
> "c:\TI\uniflash_8.3.0\deskdb\content\TICloudAgent\win\ccs_base\DebugServer\bin\DSLite" cc23xx-prog-default-ccfg -c C:\TI\Workspaces\WS2\mcuboot_blinky_LP_EM_CC2340R5_nortos_gcc\targetConfigs\CC2340R5.ccxml

For more details and examples, please refer to the UniFlash Quick Start guide

If I attempt to load the .OUT file via Uniflash, I get the following Uniflash console output: 

[6/12/2023, 2:53:43 PM] [INFO] Cortex_M0P: Writing Flash @ Address 0x00000000 of Length 0x00006f7c
[6/12/2023, 2:53:43 PM] [INFO] Cortex_M0P: Performing Chip Erase
[6/12/2023, 2:53:44 PM] [ERROR] Cortex_M0P: Image must contain (correctly sized) CCFG section, when erase type is "Chip erase"
[6/12/2023, 2:53:45 PM] [INFO] Cortex_M0P: Debugging is not allowed. If this not expected, check your CCFG.
[6/12/2023, 2:53:45 PM] [INFO] Cortex_M0P: Flash loading is currently not supported if debugging is not allowed.
[6/12/2023, 2:53:45 PM] [INFO] Cortex_M0P: If you are experiencing issues with loading your application, do the following (this will erase the chip):
[6/12/2023, 2:53:45 PM] [INFO] Cortex_M0P: - Code Composer Studio:
[6/12/2023, 2:53:45 PM] [INFO] Cortex_M0P: - End the current debug session (if any is active).
[6/12/2023, 2:53:45 PM] [INFO] Cortex_M0P: - View -> Target Configurations -> Right click on .ccxml file for your project -> Launch Selected Configuration.
[6/12/2023, 2:53:45 PM] [INFO] Cortex_M0P: - Run -> Load -> LoadProgram -> Select the program file containing a valid CCFG.
[6/12/2023, 2:53:45 PM] [INFO] Cortex_M0P: - You should now be able to load your application to the target.
[6/12/2023, 2:53:45 PM] [INFO] Cortex_M0P: - UniFlash:
[6/12/2023, 2:53:45 PM] [INFO] Cortex_M0P: - Run the following dslite command:
[6/12/2023, 2:53:45 PM] [INFO] Cortex_M0P: dslite --mode cc23xx-prog-default-ccfg -c [path to your ccxml file]
[6/12/2023, 2:53:45 PM] [INFO] Cortex_M0P: - You should now be able to load your application to the target.
[6/12/2023, 2:53:45 PM] [ERROR] Cortex_M0P: Halting at entry of application is not allowed. Are you sure debugging is allowed?
[6/12/2023, 2:53:45 PM] [INFO] Cortex_M0P: Running the application, without halting at the entry of the application.
[6/12/2023, 2:53:45 PM] [ERROR] 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)
[6/12/2023, 2:53:45 PM] [SUCCESS] Program Load completed successfully.

Attempting 's verified solution for Joe Gilfilian's post:

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

Once I run the script in Step 5, I get the following in the console:

And then when I move to the next step with the dslite command, I see this:

c:\TI\uniflash_8.3.0>dslite --mode noConnectFlash cc23xx-prog-default-ccfg -c C:\TI\Workspaces\WS2\mcuboot_blinky_LP_EM_CC2340R5_nortos_gcc\targetConfigs\CC2340R5.ccxml
Executing the following command:
> "c:\TI\uniflash_8.3.0\deskdb\content\TICloudAgent\win\ccs_base\DebugServer\bin\DSLite" noConnectFlash cc23xx-prog-default-ccfg -c C:\TI\Workspaces\WS2\mcuboot_blinky_LP_EM_CC2340R5_nortos_gcc\targetConfigs\CC2340R5.ccxml

For more details and examples, please refer to the UniFlash Quick Start guide.

info: Cortex_M0P: Flash loader: CC23xx_FLASH_LIBRARY_VERSION 3.17.09.20
Failed: Unable to open file: cc23xx-prog-default-ccfg

Similar deal if I use the command on the next line of that solution:

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

c:\TI\uniflash_8.3.0>dslite flash cc23xx-prog-default-ccfg -c C:\TI\Workspaces\WS2\mcuboot_blinky_LP_EM_CC2340R5_nortos_gcc\targetConfigs\CC2340R5.ccxml
Executing the following command:
> "c:\TI\uniflash_8.3.0\deskdb\content\TICloudAgent\win\ccs_base\DebugServer\bin\DSLite" flash flash cc23xx-prog-default-ccfg -c C:\TI\Workspaces\WS2\mcuboot_blinky_LP_EM_CC2340R5_nortos_gcc\targetConfigs\CC2340R5.ccxml

For more details and examples, please refer to the UniFlash Quick Start guide.

info: Cortex_M0P: Flash loader: CC23xx_FLASH_LIBRARY_VERSION 3.17.09.20
Cortex_M0P: GEL Output: Memory Map Initialization Complete.
Failed: Unable to open file: flash

Moving onto Simbasoft's solution:

The procedure detailed below should be followed if flashing a blank device or a device that has been mass-erased. If the procedure is performed on a non-blank device, the procedure will not have any negative effect. The following steps may be used to resolve the “Error -1274 @ 0x0” flashing error. (I did a UniFLASH CHIP ERASE before starting this)

  1. In CCS, open the Target Configuration view by clicking on View → Target Configurations.

  2. In the Target Configuration window, click and expand the “Projects” folder.

  3. Within the “Projects” folder, click and expand your project.

  4. Click and expand the targetConfigs folder.

  5. At this stage, you should see the CC2340R5.ccxml file. Right click and click on “Launch Selected Configuration”

  6. After a few seconds, the CCS view should switch to Debug view and the target configuration should launch. The target configuration has finished launching if the “Texas Instruments XDS110 USB Debug Probe/CORTEX_M0P” core is visible in the Debug window.

  7. Click on Scripts → CC23xx → ProgramDefaultCcfg. This is where I'm stuck - there is no ProgramDefaultCcfg option here.

  8. Afterwards, you should see a success message in the Console. The device may now be flashed.

Next set of steps:

  1. Open Uniflash

  2. Open a CC2340R5 configuration.

  3. Click on Standalone Command line

  4. Click on Generate Package

  5. After package is generated, save the zip file to C:\ti\uniflash_7.1.0.

  6. Extract the contents of the uniflash_windows.zip archive into C:\ti\uniflash_7.1.0\uniflash_windows

  7. Open a Windows Command Prompt

  8. Navigate to the C:\ti\uniflash_7.1.0 directory in the command prompt by running the following command cd C:\ti\uniflash_7.1.0

  9. Run the following command: dslite.bat --mode cc23xx-prog-default-ccfg -c C:\ti\uniflash_7.1.0\uniflash_windows\user_files\configs\cc2340r5.ccxml

  10. Afterwards, you should see a success message in the Console. The device may now be flashed.

I get the following CMD response:

c:\TI\uniflash_8.3.0>dslite.bat --mode cc23xx-prog-default-ccfg -c C:\ti\uniflash_8.3.0\uniflash_windows\user_files\configs\cc2340r5.ccxml
Executing the following command:
> "c:\TI\uniflash_8.3.0\deskdb\content\TICloudAgent\win\ccs_base\DebugServer\bin\DSLite" cc23xx-prog-default-ccfg -c C:\ti\uniflash_8.3.0\uniflash_windows\user_files\configs\cc2340r5.ccxml

For more details and examples, please refer to the UniFlash Quick Start guide.

But when I attempt to flash the image that is inside the uniflash_windows folder (using the same target config as is inside the uniflash_windows folder) I'm met with the same errors:

And back in CCS I still can't flash/debug anything.

[6/12/2023, 3:36:01 PM] [INFO] Cortex_M0P: Flash loader: CC23xx_FLASH_LIBRARY_VERSION 3.17.09.20
[6/12/2023, 3:36:02 PM] [ERROR] Cortex_M0P: Image must contain (correctly sized) CCFG section, when erase type is "Chip erase"
[6/12/2023, 3:36:03 PM] [INFO] Cortex_M0P: Debugging is not allowed. If this not expected, check your CCFG.
[6/12/2023, 3:36:03 PM] [INFO] Cortex_M0P: Flash loading is currently not supported if debugging is not allowed.
[6/12/2023, 3:36:03 PM] [INFO] Cortex_M0P: If you are experiencing issues with loading your application, do the following (this will erase the chip):
[6/12/2023, 3:36:03 PM] [INFO] Cortex_M0P: - Code Composer Studio:
[6/12/2023, 3:36:03 PM] [INFO] Cortex_M0P: - End the current debug session (if any is active).
[6/12/2023, 3:36:03 PM] [INFO] Cortex_M0P: - View -> Target Configurations -> Right click on .ccxml file for your project -> Launch Selected Configuration.
[6/12/2023, 3:36:03 PM] [INFO] Cortex_M0P: - Run -> Load -> LoadProgram -> Select the program file containing a valid CCFG.
[6/12/2023, 3:36:03 PM] [INFO] Cortex_M0P: - You should now be able to load your application to the target.
[6/12/2023, 3:36:03 PM] [INFO] Cortex_M0P: - UniFlash:
[6/12/2023, 3:36:03 PM] [INFO] Cortex_M0P: - Run the following dslite command:
[6/12/2023, 3:36:03 PM] [INFO] Cortex_M0P: dslite --mode cc23xx-prog-default-ccfg -c [path to your ccxml file]
[6/12/2023, 3:36:03 PM] [INFO] Cortex_M0P: - You should now be able to load your application to the target.
[6/12/2023, 3:36:03 PM] [ERROR] Cortex_M0P: Halting at entry of application is not allowed. Are you sure debugging is allowed?
[6/12/2023, 3:36:03 PM] [INFO] Cortex_M0P: Running the application, without halting at the entry of the application.
[6/12/2023, 3:36:04 PM] [ERROR] 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)
[6/12/2023, 3:36:04 PM] [SUCCESS] Program Load completed successfully.

Any help is appreciated

  • Hi emc_vish,

    Thank you for providing such detailed debug information.  The process you use depends on whether your device is PG1.0 or PG2.0 silicon.  Can you connect to SmartRF Studio 8 and read out the chip information?  Also, when/where did you obtain the LaunchPad have you used PG1.0 resources (CC2340RX-PREVIEW on TI's Secure resource portal) previously?

    Regards,
    Ryan

  • Thanks for the reply, Ryan.

    - LaunchPad and Debugger were obtained from Digikey, about 3 days ago.

    - The PC I am using is a fresh Windows install, so the first TI install used on this computer has been whatever is latest on the TI site for CC2340R5 support - have not seen anything that says CC2340RX-PREVIEW

    - I'm not sure exactly how to read out chip information using SmartRF Studio. Whether or not the board(s) are connected to my PC, the home page shows CC2340R5 underneath 2.4GHz. If I double-click CC2340R5 and click on "code export", the code shows PG2.0 in the comments. If I connect the USB, the window looks like this:

    Thanks,

    Vishaal

  • Sorry, I mean reading chip information from Uniflash v8.3

    Your description indicates that it should be PG2.0 hardware and it does not sound like you've downloaded any PG 1.0 software.  While this is encouraging, it is strange that you are encountering this issue with a new LaunchPad and the latest resources.  Furthermore the Smart RF Studio 8 screenshot shows that the device can be communicated with.  Were you able to program the device once before the failure began?  Can you try a different example project such as gpiostandby and report whether behavior is any different?

    Regards,
    Ryan

  • Read device info on UniFLASH works, and returns Rev. A actually, looks like we're on to something

    I have attempted to flash many different examples, all with the same unsuccessful result.

    Vishaal

  • Then you have obtained pre-production Rev A/PG 1.0 silicon which is only supported by deprecated private software resources and should not be sold any longer.  The CC2340R5 officially released to market in early May 2023 and all pre-production software solutions stopped being provided to developers.  The resources publicly available online only support Rev B/PG 2.0 silicon.  Please contact Digikey to have them correct the issue.  All the CC2340R5 samples and evaluation modules shipped by TI are now revision B (PG2.0) material.

    Regards,
    Ryan

  • Hi Ryan,

    I was contacted by a product manager who will send me a V2 board - I've marked this issue resolved. Thank you for your help; have a great day!