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 bootloader app problem

Other Parts Discussed in Thread: CC2650, CC2538
I have been successfully using the TI sblAppEx.exe command line tool to update firmware on the cc2650 chip using the SmartRF06 eval board.  However, I am having problems getting it to work with a custom board.  I am able to get into the backdoor and launch the bootloader, but I receive a warning after successfully erasing the flash.  Shorty, the whole process fails on the writes.  Below is the error log  It basically says that I am not setting the bootloader enable flag to 0xC5, but I have double and triple checked it and the 0xC5 appears in memory when I run.  Is there a reason why the application is not registering the 0xC5 enable flag correctly?
Thank You,
----------------------------

Select COM port index: 0

Connecting (COM10 @ 230400 baud) ...
100% (480.00ms)
Erasing flash ...
100% (1032.00ms)
Writing flash ...
Warning: CC2650 bootloader will be disabled.
99% Device returned status FLASH_FAIL
100% Device returned status FLASH_FAIL
Error retrying flash download.
- Start address 0x0001FEE4 (page 31).
- Tried to transfer 252 bytes.
- This was transfer 520 in chunk 0.

  • Hi Harvey,
    Looks like a strange error. Since it's hardware releated, I would suggest looking at reducing the baudrate to 115200 or lower to see if you have UART noise issues (long cables/traces).

    Peder
  • Hi Peder,

    I went back to test the bootloader on the Eval Board and I am now running into the same problem with the custom board. I wonder if it has something to do with a setting in CCS that I may have changed?

    Also, after failing after the Erase in the bootloader, the eval board will no program through the CCS debugger anymore. It would go to the "Loading Program" state but hang there for a long time with "Cortex_M3_0: Error occurred during flash operation: Timed out waiting for target to halt" and eventually fail after many attempts.

    Seems like the failed bootloader messed something up in the programmer. All my boards seems to be bricked now, please help. Thank You.
  • Hi Harvey,

    SBL issues the warning "CC2650 bootloader will be disabled" if field BL_CONFIG[31:24] (address 0x0001.FFDB) is set to a value other than 0xC5 in the file you are trying to program. Setting this field to a value other than 0xC5 disabled the bootloader.

    The device bootloader returns the "FLASH_FAIL" status, indicating that it is unable to program the flash. This can occur if the flash sector is already locked. In the CC2650 bootloader, there are two erase commands, CMD_SECTOR_ERASE and CMD_BANK_ERASE.

    • CMD_SECTOR_ERASE cannot erase sectors that are locked, but you can erase individual sectors.
    • CMD_BANK_ERASE erases all sectors, unlocked and locked.


    For compatibility reasons with CC2538 devices, sblAppEx uses CMD_SECTOR_ERASE, that is, function SblDevice::eraseFlashRange(). If you instead use the SblDevice::eraseFlashBank() functions, you should get a speed improvement on the erase step, and also be able to erase all sectors.

    Br,
    TIABO

  • Hi Tiabo,

    It seems that the problem I had was that the endianess of my bytes were being swapped.  Hence, it couldn't detect the 0xC5. Seems to be swapped on some occasions and not on others.  I haven't figured out why that is the case as i do not change anything in between.  I am using CCS with the ARM hex utility and the hex2bin.exe utility to generate a .bin file.  

    On a separate topic, I need to create a binary file for a project that uses the ble stack.  Since the application and stack are two separate projects, how would you go about creating a binary file that contains both the application and the stack?  Is there an example somewhere?

    Thank You,

  • Hi,

    One simple option is to use SmartRF Flash Programmer 2.

    1. Select multiple files
    2. Program both files onto the device
    3. Go to the Edit tab and read flash to file. You can then store the complete image as a binary. 

    To make sure the device does not run between steps 2 and 3 (in case your application modifies flash), uncheck "disconnect after action finished" that you find under the "tools icon" in the upper right corner.

    Br,
    TIABO

  • Thanks for referring me to this tool, it is awesome!