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.

Upgrading firmware OTA for CC2650.

Other Parts Discussed in Thread: CC2640, CC2650, CC2650STK, CC2541

Hi,

I'm hoping someone can help me with a few of my questions and issues I'm running in to. 

I have a CC2650 SensorTag and I've made a simple change to the firmware so that the BLE advertisement is continuous. I've "make"d the project in IAR and it outputs a .hex file. As I understand it, I need to output a .bin file in order to do an OTA update from the iOS SensorTag App. According to the "Developer’s Guide for Over-the-Air Download" (for the CC2640) it says to change the output type to "simple-code" which is not an option for me in IAR 7.40.2.8570. The two closest options are "binary" which outputs a .bin file and "simple" which outputs a ".sim" file.  So I assume binary is the correction option, just want to double check...

Assuming binary is the correct option, I've transferred the file over to a mac, connected my iPhone and shared the ".bin" file with the TI SensorTag app in order to do the OTA update. However, everytime I choose a "Select FW File" and then choose "Shared Files..." and then choose my ".bin" file, the app crashes. Using the internal files, updating the firmware went just fine. Only when trying to load my FW does the app crash.

Is there something wrong with the App? Or is this something wrong with my image and the app doesn't like it? I don't know exactly how to determine where the issue is.

Other random details:

iOS: 8.3 - iPhone 6

SensorTag App: Version 4.1 (Build 142)

IAR is 7.40.2.8570 running on Windows 8.1

Thanks for your help!

-Mike

  • Hello. Are you sure you're not looking at the guide for the cc264x? I don't see anything relating to simple-code in the cc2640 guide. Also note that there are some errors in the cc2640 guide. See the faq for corrections: https://e2e.ti.com/support/wireless_connectivity/f/538/t/404236

    Also, note that the simpleBLEPeripheral application included with the stack includes a sample OAD configuration so you can compare with this.

    Lastly, I'm not sure you're going to be able to fit the sensor tag project in the space available for an internal flash OAD. We expect to have an example of this with external flash in the next few weeks.

  • I think I was switching between both guides...my mistake. 

    Despite this post being for a different device: stackoverflow.com/.../how-to-modify-the-ti-sensortag-firmware-to-advertise-indefinitely 

    I was hoping I could apply the same principle. That post suggested the SensorTag Project which is why I chose that one...Based on what your telling me I should use the SimpleBLEPeripheral to make my change? Will that accomplish what I'm after? I'll still be able to access all the sensors via bluetooth?

    Thanks,

    Mike

  • No, you are correct: you should work with the SensorTag proeject if you are using the SensorTag hardware and want to use the sensors. I was simply pointing to simpleBLEPeripheral as a working OAD example that you could reference.

  • Hi Tim,

    Ok, So assuming the SensorTag project will fit, I'm still not following how I get the image on the SensorTag. The guide doesn't mention anything about updating the CC2650STK with the Ti SensorTag app. The app still crashes when I try to choose my .bin file.

    Thanks,
    Mike
  • What happens when you follow section 11 "Building OAD Image B?" Does it compile? Are you able to send it over-the-air as described in Section 12?

  • I too am trying to figure out the correct procedure for sensortag. I also found that stackoverflow post for the old sensortag and followed it before I found the guide. Be happy that the IOS app didn't let you flash the .bin when just setting it to binary in IAR because android did let me which bricked my CC2650STK sensortag (just ordered the devpack hopefully when it comes I can unbrick).

    Reading through the guide now I believe the answer to your question Michael is to leave it outputting the .hex file and section 11.2's postbuild item looks like it's using a python script hex2bin to create the .bin. I can definitely confirm that just having IAR directly create the .bin file did not go well (but this was before I found the guide with other option changes but given that it wants the -r option I don't think ever having IAR create the .bin will work). Certainly let me know how following the guide goes because when I unbrick (or order new device if I can't) I will be trying again.

    Tim, do you know why the included IAR workspace TI provides with the example we are trying to do a minor tweak to doesn't have those settings already set as needed that are outlined in section 11? There are also a few things in the guide that at least for sensortag seem like they might not be right (haven't tried yet). The additional include directories came already with the CC26xxST but the guild says to add CC26xx I would assume the way it was is correct at least for that item.

    Also, when I get the devpack I will also be trying out CC studio. Is it still the case that I can't create the OAD.bin with CC studio? IAR is quite expensive and if CC studio can do it I certainly would prefer to use it.
  • Hi Greg,

    Seems like you are going through the same exact thing! So, I did follow the guide and used the python script per Tim's link and what you've suggested to generate the .bin file. However, the app still crashes on me when I choose the .bin file generated. I guess I'm still just trying to understand if I can flash it with the app or if actually have to buy other equipment such as the DevPack in order to load this on there. Makes sense you would need it if it was bricked, but as far changing one setting I was hoping I could get away without the DevPack thing. 

  • My devpack to unbrick my SensorTag hasn't arrived yet so I can't say (and also I'm using android to flash not IOS so there maybe differences).  However, having read the guide a few times now so I'm ready when I can unbrick mine I'm just curious how large your .bin file is.  The Image B area in the document seems to allow for up to 36KB but when I build the sensortag application project the .bin is around 50KB (obviously too big).  I also looked at the ti app .bin that they flash in the app itself (from factory came with 0.99 firmware) and when connected first time it recommends you upgrade to 1.01 firmware).  This 1.01 .bin file though is 128kb (whole rom space on sensortag) so it seem it contains the whole image (bim,stack, and sensortag app) and flashes it via bluetooth OAD.  The fact that it's 128KB puzzles me since the documentation states bluetooth OAD will only flash the Image B (36KB) and states it can't update the bim and stack. Something doesn't jive with the document.

    The only thing that makes sense to me is maybe the IOS app does a sanity check on Image B and android doesn't.  50KB sensortag project seems to large if their documentation is correct and it's only allowed to write image B.  Perhaps thats why mine got bricked but its hard to say. I'll try again when my devpack arrives.


    Anyone from TI care to elaborate on the what the OAD is actually capable of and if the ios app is crashing because it's detecting image B size too large? Also, how is the 128KB firmware update being handled over OAD when the document states BIM and stack require the devpack?

  • As you state and was mentioned in the first post here, you will not be able to do an OAD using internal flash of the Sensor Tag project unless you manage to shrink the code to 46 kB (38 kB available + 8 kB available if two NV pages are removed).

    The sensor tag is currently using external OAD but it is currently undocumented, unsupported, and not the same method that will be used in the 2.1 release.
  • Tim C said:

    The sensor tag is currently using external OAD but it is currently undocumented, unsupported, and not the same method that will be used in the 2.1 release.

    When you say sensortag you mean the android and ios apps currently use external OAD correct? I assume this is the only mode they support and that we cannot substitute out in section 12 of the OAD for CC26xx.pdf the SBL demo tool for the android or IOS app to download the application image (if we managed to shrink it)?

    I believe this is the main disconnect I was having that the android/IOS app cannot OAD in the manner in the guide that only the SBL demo tool can really do that process in the pdf.  It sounds like (obviously we'll find out in July) that the android/IOS apps OAD flash the entire 128kb image and want the entire image and this is the only way they operate.

  • Hi, Tim

    Dose TI have a confirmed release time for this v2.1 document and corresponding iOS/Android application source code ?

    If I didn't misunderstand, I cannot follow the document "Developer’s Guide for Over-the-Air Download v2.0" to generate a binary firmware update file which could be used by current iOS/Android application ? Is that correct ?

    Besides, could you please help me clarify that

    (1) Is the structure of firmware update file for external flash the same as one for internal flash ?

    (2) Would OAD file for external flash update the whole flash including BIM, image A, image B and CCA or just image B only ?

    Thank you.

  • Does anyone know if TI intends to release a CC2650/CC2640 with 256KB of flash?
    It will enable to update its FW over-the-air using known methods for the CC2541 (256KB of course).
  • Hi Mike!

    As i am new with SensorTag CC2650 and looking for the same result as you do i want to ask you (and all the other experts) following:

    1. how did you convert via IAR Embedded workbench the firmware to a hex file and
    2. would the CC-DEVPACK-DEBUG in combination with Flash Programmer 2 be an option to get the .hex file onto the CC2650?

    best regards,

    Matt
  • Hi I am Madhusudan and i am totally new to the OTA, i just completed my application and i want to impliment OTA, so read the document and i was not able to understand much, i need little help to start,

    I am using Cc2640, IAR work bench, and i have external memory mounted,  

    Please help me on this.