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.

How do I program system flash on CC2640?

Other Parts Discussed in Thread: CC2640

Greetings.


I would like to be able to do an OAD firmware upgrade on my CC2640-based device.  My device has a 256kB serial flash chip, so I am planning to perform the firmware upgrade by first copying the firmware image to the serial flash via BLE and then copying the firmware image from the serial flash to the CC2640's system flash.

I chose this method because I can update the entire image without any size limitations and because the SPI interface to the serial flash is simple enough that I can easily fit the transfer code in RAM (since I can't run from flash while programming flash).

My problem is that the TRM doesn't explain how to program the system flash.  The TRM says that I need to use a TI API to do this, but I'm having difficulty finding the required API.

Could someone please point me in the right direction?

Thank you

Scott

  • Hi Scott,

    Have you taken a look at our BLE OAD Users guide? There is a framework for doing OAD already created here at TI. If this meets your needs, it would greatly simplify your design. You can find this document in the BLE stack install location under Documents. This is for stack v2.1.
  • Hi Sean

    Thank you for the suggestion.

    We are trying to squeeze as much performance out of BLE as we can for our application, so when TI ultimately updates the BLE stack to support Bluetooth 4.2, we would like to be able to upgrade the stack as well.

    Also, my way fits in a little easier with our existing client-side firmware upgrade library that we use to upgrade all of our other products.

    The main downside to my method compared your OAD is that I don't have a bootloader so a botched upgrade will brick our device. Hopefully with copious checksumming and other validation, this will not be a common problem.

    Thank you
    Scott

    PASCO scientific
    www.pasco.com
  • Scott,

    Our off chip OAD profile supports updating the stack as well as the application in a merged Intel (.hex) file. This would allow you the update the app and the stack together. Might be worth investigating or testing for the benefit of having a bootloader

    Either way, writing directly to FLASH can be accomplished using the RTOS drivers for CC26xx. The default install location for the RTOS FLASH API is C:\ti\tirtos_simplelink_2_13_00_06 (for v2.1).

    From there you can navigate to the \tirtos_docs_overview.html and navigate to the CC26xxware or assuming you've used the default stack install location you can paste the link below in your browser.

    C:\ti\tirtos_simplelink_2_13_00_06\products\cc26xxware_2_21_01_15600\doc\driverlib\group__flash__api.html
  • Thank you Sean, I'll check that out

    Scott