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.

CC2340R5: Cannot program using XDS110, works when using Launch pad CC3220 as SWD interface

Part Number: CC2340R5
Other Parts Discussed in Thread: UNIFLASH

Tool/software:

Hi

I've got a custom design with a CC2340R5 SOC, that I have worked for a while using CCS and UNIFLASH connected via the SWD part of a CC3220 Lauchpad I had laying around. I have used CCS version 12.3.0.00005 and UNIFLASH version 9.1.0.5175 (and also version 8.5.0 earlier). I had never had an issue programming or debugging it.

Now the design has made it to production, the production house is unable to program these devices with an XDS110. They get the error: 

[ERROR] Cortex_M0P: File Loader: Memory write failed: Target did not enter SACI after pin reset

I have now tested this here and I get the same error when using my own XDS110.

I have used the same XDS110 for a bunch of other processors, CC26xx and for those it works fine.

I just wanted to find out if there is a way to solve this via software before I post them one of my launchpad's in order to program as this is quite urgent now, it's holding up production.

Thanks

Reto

  • Hello Reto,

    Can you confirm that using Uniflash with the device and an XDS you can erase the device? I know of an issue where the device cannot be flashed with a debug-authentication required project because the CCFG is empty, which you would need to re-program with any valid CCFG before updating the device with your production firmware. 

    Thanks,
    Alex F

  • Hi Alex

    No chip erase gives me the same error:

    I can read memory tho:

    Something really strange going on...

    Regards

    Reto

  • Hello Reto,

    Just double checking, but was the device set to disallow chip erase, but allow debug? 

    Thanks,
    Alex F

  • Hi Alex

    This happens to new, virgin devices at the manufacturer when they try to program.

    Reto

  • Hello Reto,

    I will try to replicate your issue tomorrow, but assuming the device PCB layout is sound (and the proper connections to SWD are made) the only issue that I can think of is the "bug" where if there is no valid CCFG the device bugs out when trying to program, and the only way to fix it was to re-flash the board with a "debug-authenticated" project (just grab one of our .hex BLE examples from our SDK) and then flash your target firmware. 

    Thanks,
    Alex F

  • I just tried to load basic_ble_app.hex and same error. Just thinking, if it is maybe an issue with my SWD connection, I do have a 100k pullup and a 1nF pull down on the RST Line:

    Maybe reset timing is different between XDS110 and CC3220 Lauchpad?

  • Hello Reto,

    In your PCB design you did have it submitted/reviewed by our online form correct? And I would say we should probably double check the PCB design vs the CC2340R5 launchpad.

    Thanks,
    Alex F

  • Hi Alex

    Sorry I inadvertedly posted the wrong schematics, this is the correct one:

    Now as you can see I use one of the SWD pins as a GPIO, for testing I have now removed D2, which means that the connection is exactly like your eval board, which also has a 100k pullup and a 100nF cap on RST.

    I still can't get it to work.

    I tried in CCS to use the launch debug configuration, then connect without loading the firmware. I can happily launch, connect and browse the memory in a memory browser. As soon as I load the firmware image it comes up with this error, which is slightly different to UNI Flash:

    Cortex_M0P: GEL Output: Memory Map Initialization Complete.
    SEC_AP: Trouble Writing Memory Block at 0x0 on Page 0 of Length 0x1: (Error -2130 @ 0x0) 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 9.11.0.00128)
    Cortex_M0P: File Loader: Memory write failed: Target failed to write 0x00000
    Cortex_M0P: GEL: File: C:\_git\Illuminati\sw\MagnetoMultiSense\MagnetoMulitSenseBootloader\Debug\MagnetoMultiSenseBootloader.out: Load failed.
    CS_DAP_0: Trouble Reading Register CFGAP.DEVICESTATUS: (Error -2131 @ 0x2010C) 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 9.11.0.00128)

    I even lowered the SWD clock to 100kHz, no difference.

    I'm now at the stage that I will get the factory to source a CC3220 and try to program via that.

    Thanks

    Reto

  • Hello Reto,

    Reading into the error it seems like even the first write fails (0x0000) meaning that we may have some sort of connection or authentication issue here. 

    Thanks,
    Alex F