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.

Disable Flash read from FlashProgrammer 2

Other Parts Discussed in Thread: CC2640, CC2650, CC1310

Hi,

The flash programmer2 has a feature to readback the internal flash contents to a file. I want to selectively disable this readback feature but still be able to program my CC2640 using 2 wire JTAG. 

Please let me know if this is possible.

Regards,

Sayu Sekhar.

  • Hello Sayu,

    The CC26XX Cortex M3 does not have an MPU (memory protection unit) and therefore the CPU can read everything. CCFG (last page of flash) can be used to configure only erase/write protection. This can be useful to protect from write corruption (do not enable write protect for NV pages used by your application).

    To protect from read you can:

    • Disable all JTAG DAP/TAPs (Debug/Test Access Port) through CCFG.
    • Disable ROM bootloader and ROM bootloader backdoor in CCFG (programmed pin held at programmed level at boot -> device goes to boot loader mode

    To reprogram with these settings enabled you need to to a full chip erase before reprogramming the chip.

  • Hi Eirik,

    Thanks for the detailed information. So in case I do the following:

    • Disable all JTAG DAP/TAPs (Debug/Test Access Port) through CCFG.
    • Disable ROM bootloader and ROM bootloader backdoor in CCFG (programmed pin held at programmed level at boot -> device goes to boot loader mode

    I can still reprogram the device, just that I would have to do a full erase. Is that correct?

    Thanks,

    Sayu Sekhar

  • Correct, when the debug interface is locked, only forced mass erase is possible.
  • Hi Eirik,

    I actually had tried something like this. the flash programmer gives a message saying "debug interface is locked. Only mass erase is possible"
    However, when I do a mass erase, though it reports a success, in the messages I see failure reading a memory location 0x401900.
    and if i try to program it after the mass erase, the programming fails with similar error message
    Error while reading memory range. Address 0x40091090.
    I am not able to get the device out of the "debug interface lock".

    Regards,
    Sayu
  • Hello Sayu,
    Sorry, I missed you statement about using 2 wire JTAG.
    You need to connect the reset line as well. When flashing the device the debuggers resets the device and then toggles TCK to make the boot ROM stop the CPU before TI RTOS starts up and disables JTAG again.
  • Hi Eiric,

    The issue we are facing is with sensor tag 2.0
    We do not have a ccdev pack debugger, we use the Olimex XDS100-V3 debugger with the Olimex JTAG 20pin to 10pin adaptor.
    I assumed the reset line is connected in there.

    Regards,
    Sayu Sekhar.
  • Hello Sayu,

    I don't have the Olimex debugger, but i have the SensorTag devpack debugger (xds110) and the SmartRF06EB (xds100v3). I tested both with Smart RF Flash programmer 2 and it worked. Can you post the screenshot of you smartRF Flash Programmer window to see the settings used?

  • Hi Eirik,

    Below screenshots showing debug interface locked and erase. It shows erase successful but in the status field, we can see an error message.

    This is with the CC debugger dev pack.

    Regards,

    Sayu Sekhar

  • Hello Sayu,
    Looks like you are running regular erase option. The mass erase option is a separate command that can only be accessed from the toolbar on the top right corner (left to the help icon). Open the help menu in smart RF Flash programmer 2 and read about the CC26xx/CC13xx Forced Mass Erase command.
  • Hi Eirik,

    I am using the "CC26xx/CC13XX Force Mass Erase" from the wrench menu next to help.

    Regards,

    Sayu Sekhar

  • Ok, tell me how to locked it initially so I can try to reproduce it.
    The CC2650 LaunchPad has xds110 onboard and a 10 pin 1.26 mm header for connecting external targets. I would consider getting this:
    www.ti.com/.../launchxl-cc2650
  • Hi Eirik,

    We were trying to do an OAD over sensor tag and as part of OAD, we wanted to modify CCFG area so that JTAG DAP/TAPs are disabled.
    I suspect we might have accidentally erased CCFG which I think is an unrecoverable state even for Flash Programmer.

    Regards,
    Sayu Sekhra.
  • Same happened to me with a CC1310. I was reprogramming the flash inside my firmware and now I can't access it nor do a mass erase with Flash Programmer 2.
    Could you recover your CC2640?

    Regards
    Armin Inauen