我是一个iOS开发者和工作an app that communicates with BLE device that is working on DA14580.
I do not know how the device is actually working. To update firmware on the device we send special command to it, then device reboots with new name and SUOTA service(0xFEF5) become available. In this new state the only thing that is working is SUOTA service. To return back to the app working state the only thing that works is a successful SUOTA process either through our app or through SOUTA iOS app.
Is it possible to cancel SUOTA process? Or return to previous working firmware in case if firmware update process fails?
Does it overwrite existing firmware?
I'm not really familiar with this hardware. I have already tried to send 0xFE(SUOTA END) and 0xFD(REBOOT) commands. Device reboots but stays in non workable state.
Thank you for your help.
Hi seryukov,
It sounds like a custom fw that has two images, the first image is the application itself, and the second image is a project supporting only SUOTA, so i assume that when you send that special command to the application, the device reboots and loads the second image that has only the SUOTA service, you update the device with the new app fw and then the bootloader loads the newly uploaded fw. I assume that this is done due to the size of the original application since there wasn't enough space to include the SUOTA in the existing application. If that is the case this custom design has only one application image and when the SUOTA image is up and running the new fw that is uploaded overwrites the application image. In that case there is no rollback to the older image since the old application is replaced with the new one, and if there is an error in the process there is no turning back. Just to make myself clear all the above are just assumptions in how the fw that you have works.
In general the SUOTA scheme has two different banks that the user can store two different or even same images, the reason for that is, if the transfering of the image isn't successfull the old image will still be located in the flash, so in a subsequent reset the secondary bootloader will load the previous image and not the corrupted one. Which of the two images will be loaded depends on the Secondary bootloader that can be located in the flash or in the OTP. You can check the AN-B-010.pdf that describes the procedure in order to shed more light to the SUOTA procedure or you should check this with the designer of the application that you have.
Thanks MT_dialog