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.

LAUNCHXL-CC1312R1: Command line tool for unblocking cc1312

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

I am using BIM and I have write protected the flash with

SET_CCFG_CCFG_TAP_DAP_0_TEST_TAP_ENABLE and SET_CCFG_CCFG_TAP_DAP_0_CPU_DAP_ENABLE

I can unlock the chip with Uniflash for Windows (not linux) but I need a command line tool to unblock it for our build pipeline.  I have tried using dslite (windows and linux) with the --mode cc13xx-cc26xx-mass-erase option, but it fails to unlock the chip. The command works OK when the chip is not locked.

Is there a command line method that I can use?

Thanks,

David

  • Hi David,

    CCFG is part of flash. If you have write protection for flash you won't be able to overwrite CCFG.

    If you have not disabled CHIP_ERASE_REQ then you should be able to do a forced mass erase. 

    Have you tried using Uniflash or Flash Programmer 2 for the flash erase?

    Cheers,

    Marie H

  • Hi Marie,

    I cannot find a reference to CHIP_ERASE_REQ. I have found:

    #define SET_CCFG_ERASE_CONF_CHIP_ERASE_DIS_N            0x1        // Any chip erase request detected during boot will be performed by the boot FW

    #define SET_CCFG_ERASE_CONF_BANK_ERASE_DIS_N            0x1        // Enable the boot loader bank erase function

    These are both still set to 0x01.

    I can erase the chip with Uniflash. But not with dslite, the command line utility made from Uniflash.

    I need a command line utility to do this because it is part of out gitlab build pipeline. GUI tools are no use for this.

    Thanks,

    David

  • Hi David,

    Yes these are the registers I referred to.

    I will send your post to the CCS/Uniflash team. If they don't come back to you within a few days, please ping me.

    Cheers,

    Marie H

  • Just to add, we can now mass erase using srfprog.exe. But we really need a linux command line utility for our gitlab pipeline and srfprog is only available for Windows.

  • Hi David,

    I can erase the chip with Uniflash

    If you are simply pressing the Erase button in the UniFlash GUI settings, try the below UniFlash CLI command:

    > ./dslite.sh -c <CCXML FILE> -a Erase

    Thanks

    ki

  • Thanks for the reply Ki,

    When I do this (from windows), I get the following error:

    C:\Users\dww\ti\cl>dslite.bat -c cc1312r1f3.ccxml -a Erase
    Executing the following command:
    > "C:\Users\dww\ti\cl\ccs_base\DebugServer\bin\DSLite" flash -c cc1312r1f3.ccxml -a Erase

    For more details and examples, please visit software-dl.ti.com/.../latest_qsguide.html

    fatal: IcePick_C: Error connecting to the target: (Error -241 @ 0x0) A router subpath could not be accessed. A security error has probably occurred. Make sure your device is unlocked. (Emulation package 9.9.0.00040)
    Failed: Operation was aborted

    C:\Users\dww\ti\cl>

  • I can erase the chip with Uniflash.

    What is the exact sequence of steps that you do to erase the chip via Uniflash GUI?

  • 1. I Start Uniflash
    2. Select the launchpad.
    3. Go to settings & utilities.

    4. Manual Erase -

    5. Select erase entire flash

    6. Press Erase Entire Flash

    7. Uniflash pops up a box that says 'This device is locked', 'Do you want to do a mass erase to unlock it? The flash memory on this device will be wiped.'
    8. Press Yes
    9. Mass erase succeeds and the device is now unlocked.

  • 7. Uniflash pops up a box that says 'This device is locked', 'Do you want to do a mass erase to unlock it? The flash memory on this device will be wiped.'
    8. Press Yes
    9. Mass erase succeeds and the device is now unlocked.

    I'm not sure which type of mass erase is happening here vs --mode cc13xx-cc26xx-mass-erase. I will need to follow up with engineering.

  • David,

    Can you provide the exact command you ran when using the cc13xx-cc26xx-mass-erase mode, and the output you got back?

    The cc13xx-cc26xx-mass-erase mode should work the same as the unlock that happens in the GUI when it detects a locked device.

    Thanks,

    Ricky