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.

CC2650: cc2650 not able to forced mass erase after lock debug interface

Guru 14805 points
Part Number: CC2650
Other Parts Discussed in Thread: Z-STACK,

Hello, 

while flashing z-stack 1.2.2a hex file i have enabled lock debug interface in smart rf flash programmer

after that I am not able to do forced mass erase also and showing below error

>Initiate access to target: XDS-06EB122F6160A.

>Create XBAL object failed: Target connect failed

>Failed to create device object.

  • As far as I understand this is expected behaviour since flash programmer needs access to the debug interface to do a mass erase. This is a security feature ensuring that no one can change the device in the field (if that is wanted)
  • 1) in any case mass erase option should work.
    2) " This is a security feature ensuring that no one can change the device in the field (if that is wanted)" , this feature is also not working because I can do mass erase from other computer.
  • I'm not following: So what you are seeing is that you connect the DUT to one computer and you are not able to do a mass erase but you are able to do mass erase from a different computer?
  • yes, I connect the DUT to one computer load the program with selecting lock debug interface but after flashing m not able to do mass erase from same computer .
    and then i connect DUT to another computer ,there I am able to do mass erase.
  • If you do the full process on the second computer, do you see the same?
  • If I do the full process on the second computer,

    I am able to do mass erase with the following error-

    >Initiate access to target: XDS-06EB122F6160A.

    >Failed to read target memory.

    >Error while reading memory range. Address 0x40091090.

    >Start flash erase ...

    >Erase finished successfully.

    >Reset target ...

    >Reset of target successfull.

  • I don't see why changing PC should make any difference. Does it only work if you switch computers and not if you disconnect the board and connect it again to the same computer?
  • I have removed flash programmer 2 from first pc on which I was not able to do mass erase.

    and installed again , now m able to do mass erase for the same pc.

    But it shows some error in log, I hope this should be fine ??

    >Initiate access to target: XDS-06EB122F6160A.

    >Failed to read target memory.

    >Error while reading memory range. Address 0x40091090.

    >Start flash erase ...

    >Erase finished successfully.

    >Reset target ...

    >Reset of target successfull.

  • Ok.
    Do you get the same error message if you don't lock the debug interface and have you checked that the flash actually is erased when you get the "erase finished successfully".
  • if don't enable flash lock, the i don't get the error.
    In both the cases flash gets erased actually, when it shows "erase finished successfully".
  • Dhanraj,

    I'm lost in what you're doing when you get the error message. Could you share the HEX image you are using, provide step by step instructions on how to reproduce the issue, and details about the HW you are working on?

    Thanks!

    Br,
    TIABO

  • DUT Hardware - CC2650F128RHB (CUSTOM BOARD)

    Debugger- SMARTRF 05 DEV BOARD

    Programming tool- smart RF flash programmer 2

    DUT to DEV Board connection method - 10 pin JTAG connection

    Please find attached hex file 

    zed code.rar

    procedure -

    here is full log 

    >Initiate access to target: XDS-06EB122F6160A.

    >Reading file: C:/Users/dhanraj-FT/Desktop/DB50ApplicationV3.hex.

    >Reading file: C:/Users/dhanraj-FT/Desktop/DB50ZstackCoreV3.hex.

    >Start flash erase ...

    >Erase finished successfully.

    >Start flash programming ...

    >Locking the debug interface. A device reset must be performed for this to take effect.

    >Programming finished successfully.

    >Start flash verify ...

    >Skip verification of unassigned page: 10.

    >Skip verification of unassigned page: 11.

    >Skip verification of unassigned page: 12.

    >Skip verification of unassigned page: 29.

    >Skip verification of unassigned page: 30.

    >Page: 0 verified OK.

    >Page: 1 verified OK.

    >Page: 2 verified OK.

    >Page: 3 verified OK.

    >Page: 4 verified OK.

    >Page: 5 verified OK.

    >Page: 6 verified OK.

    >Page: 7 verified OK.

    >Page: 8 verified OK.

    >Page: 9 verified OK.

    >Page: 13 verified OK.

    >Page: 14 verified OK.

    >Page: 15 verified OK.

    >Page: 16 verified OK.

    >Page: 17 verified OK.

    >Page: 18 verified OK.

    >Page: 19 verified OK.

    >Page: 20 verified OK.

    >Page: 21 verified OK.

    >Page: 22 verified OK.

    >Page: 23 verified OK.

    >Page: 24 verified OK.

    >Page: 25 verified OK.

    >Page: 26 verified OK.

    >Page: 27 verified OK.

    >Page: 28 verified OK.

    >Page: 31 verified OK.

    >Verification finished successfully.

    >Reset target ...

    >Reset of target successfull.

    Now turn off the Smart rf board and turn on back.

    and select cc2650 in device list

    here is the full log

    >Initiate access to target: XDS-06EB122F6160A.

    >Failed to read target memory.

    >Error while reading memory range. Address 0x40091090.

    >Start flash erase ...

    >Erase finished successfully.

    >Reset target ...

    >Reset of target successfull.

    ------------------------------------------------------------------------------------------------

  • Thinking about it, this error you get is an issue with SmartRF Flash Programmer 2. Very early in the connect process it tries to read from as part of identification process. When the debug interface is locked, that read will fail and you get the read error you see. 

    The mass erase is still successful, but the error message should not have surfaced as it does today.

    TIABO

  • OK
    Intention for enabling lock debug is so that no one can read flash memory. and any other activity will require prior mass erase and hence any data from device can not be viewed/read/cloned.

    hope this understanding is correct.
  • The "lock debug interface" feature locks the debug interface (cJTAG/JTAG). It does not disable the serial bootloader, hence it will still be possible to do memory reads using the serial interface (SPI or UART). There is a separate lock bit for the serial bootloader which you should probably lock as well.

    TIABO
  • how to do that?
  • You can use the "Disable bootloader" checkbox in the "Customer Configuration" section on the right hand side. On your screenshots, it's truncated and only shows as "Disable".

    TIABO
  • If want to reflash the device , it will not cause any issue ??

    Also it should not cause any issue during OTA?

  • If you want to re-flash the device when the debug interface and ROM bootloader is locked, you must do a mass erase first.
  • I have selected "disable boot loader" and " lock debug interface" while flashing device.

    In the log i can see about locking debug interface ">Locking the debug interface. A device reset must be performed for this to take effect."

    But i can't see anything about disable boot loader.

    also it shows an error in log as - >ERROR: Failed to reset device.

    is there any way to make sure that boot loader is disabled??

    you can see flash programmer log below -

    ----------------------------------------------------------------------------------------

    >Initiate access to target: XDS-06EB122F6160A.
    >Reading file: C:/Users/dhanraj-FT/Desktop/DB50ApplicationV3.hex.
    >Reading file: C:/Users/dhanraj-FT/Desktop/DB50ZstackCoreV3.hex.
    >Start flash erase ...
    >Erase finished successfully.
    >Start flash programming ...
    >Locking the debug interface. A device reset must be performed for this to take effect.
    >Programming finished successfully.
    >Start flash verify ...
    >Skip verification of unassigned page: 10.
    >Skip verification of unassigned page: 11.
    >Skip verification of unassigned page: 12.
    >Skip verification of unassigned page: 29.
    >Skip verification of unassigned page: 30.
    >Page: 0 verified OK.
    >Page: 1 verified OK.
    >Page: 2 verified OK.
    >Page: 3 verified OK.
    >Page: 4 verified OK.
    >Page: 5 verified OK.
    >Page: 6 verified OK.
    >Page: 7 verified OK.
    >Page: 8 verified OK.
    >Page: 9 verified OK.
    >Page: 13 verified OK.
    >Page: 14 verified OK.
    >Page: 15 verified OK.
    >Page: 16 verified OK.
    >Page: 17 verified OK.
    >Page: 18 verified OK.
    >Page: 19 verified OK.
    >Page: 20 verified OK.
    >Page: 21 verified OK.
    >Page: 22 verified OK.
    >Page: 23 verified OK.
    >Page: 24 verified OK.
    >Page: 25 verified OK.
    >Page: 26 verified OK.
    >Page: 27 verified OK.
    >Page: 28 verified OK.
    >Page: 31 verified OK.
    >Verification finished successfully.
    >Reset target ...
    >ERROR: Failed to reset device.

    -------------------------------------------------------------

     

  • To check if the serial bootloader is locked you can go to the "Edit" view and read out CCFG. From there you can find the correct bit to see that it's set correctly.
  • can you show in screenshot, because i can't find view and read out CCFG in flash programmer 2
  • Edit: Corrected image.


    You can find more details about the CCFG fields in the CC26x0 technical reference manual.

    TIABO