5 Replies Latest reply on May 1, 2015 4:21 AM by userc_18010

    OTA upgrade without external flash

      How practical/possible is it to perform an OTA upgrade without using an external serial flash? Can the FR DCT, OTA app and Factory Reset App also be stored on the 1MB MCU flash? I am using STM32F205 as an MCU.

        • 1. Re: OTA upgrade without external flash

          Hi,

          The design of the OTA upgrade system allows applications to be put on internal flash as well well as external.However this was not tested. An address is usually made of two parts, location and physical address. A location is either internal (internal MCU flash) or external (for external serial flash).

          However there are some constrains that makes this solution not appealing:

          1- Consumes quite a large area in MCU for FR and DCT

          2- You have to make sure that your actual running application doesn't over run your file system

          3- There is a risk of while updating your internal flash you corrupt your factory reset application (as they are both on the MCU) and then you will end up with a dead board.

           

          Regards,

          Bassem

          • 2. Re: OTA upgrade without external flash

            Thanks a lot for the comprehensive explanation!

             

            On Wed, Dec 3, 2014 at 5:32 AM, bassem_dawood <

            • 3. Re: OTA upgrade without external flash

              Hello Bassem,

               

              Thanks for reply this question.I'm also trying OTA function and have a follow up question according to your reply.

              According to Broadcom's documents, OTA process should update the internal flash

               

              We tried to run fr_ota application; in our try, we are able to write FR App along with DCT to external flash, however we failed every time we want to update Production Firmware and stopped at 6%.

               

              I just checked document provided in SDK "WICED-Application-Framework-April-2013.pdf". According to it OTA process shall flush internal section where New Production Firmware resides. However application ota_fr is flushing external flash ( correct me if I'm wrong, please ). We would like to know either how to fix 6% issue or how to change downloading back to internal flash.

               

              Here is my ota_fr.mk content, it might be helpful.

               

              #Set factory reset application to be this same application.

              FR_APP    := $(OUTPUT_DIR)/binary/$(CLEANED_BUILD_STRING).stripped.elf

              DCT_APP2_INDEX    := $(OUTPUT_DIR)/binary/snip_ota_fr-SSBWMN01_noreboot.stripped.elf

              DCT_IMAGE := $(OUTPUT_DIR)/DCT.stripped.elf

              OTA_APP   := $(OUTPUT_DIR)/binary/snip_ota_fr-SSBWMN01_noreboot.stripped.elf

               

              Appreciate for your help.

              • 4. Re: OTA upgrade without external flash

                Hi,

                The new version of OTA is split in to 2 parts:

                - Updating applications in the external flash

                - Loading any of those applications in to the internal flash when requested.

                 

                so when you doing an update, you should be writing external flash and once the update is done, you should call wiced_waf_set_boot and point it to the new updated application in the external flash and this will copy it in to internal flash.

                 

                One alarming point is that you have a lot of files in the external flash, is the size enough to accommodate for all of these? Also, seem that OTA_APP and APP2 are the same, why do you need to store two copies, you can just use one.

                 

                Regards,

                Bassem

                • 5. Re: OTA upgrade without external flash

                  reviewing the flash usage document, I suspect you are correct. It should be possible to have all the three apps stored on the MCU. It does require, however, some dedicated flash code that you'll need to write, plus you are likely to need of modifying the bootloader as well.

                   

                  doing this would require you to peallocate the flash sections to match the app sizes.