4 Replies Latest reply on Mar 4, 2015 5:50 PM by alex.damosys_1740326

    OTA upgrade without FR on 3.1.2



      I am using SDK 3.1.2 and BCM9WCDPLUS114 EVB (without external SPI flash).

      from reference ota_fr readme and WICED-Application-Framework-April-2013.pdf, it mentioned the production APP and DCT store in internal flash. frApp, frDCT and OTAApp store in external flash.

      Since PLUS114 only internal flash, I would like to try download ota_fr to internal flash as my productionAPP then upgrade new app overwrite the ota_fr. but if the new app size over 500KB the OTA will fail and never boot up.

      it seems OTA server keep the ota_fr code and write newAPP to other location not overwrite the ota_fr.



      test in my side.

      1. build snip.ota_fr-BCM9WCDPLUS114 download run

      2. into OTA webpage

      3. upgrade snip_apsta-BCM9WCDPLUS114.stripped.elf (file size 484KB) to EVB

      4. upgrade success, and board restart to apsta example

      5. re-do step1

      6. upgrade test_console-BCM9WCDPLUS114.stripped.elf ( 580KB) to EVB

      7. console shows no error and "Restarting.." but board never boot up




        • 1. Re: OTA upgrade without FR on 3.1.2


          In theory you can't do OTA without an external flash, because while you are downloading your new program, you will be running from internal flash and writing to it at the same time, you may run through the risk of erasing yourself.


          Also in WICED 3.1.2, OTA is now different from the way it was done before. Without too much details, we now write the new applications to external serial flash (rather than internal flash) and then reloaded from external flash to internal flash.


          Having said that, I believe (in fact pretty sure) the BCM9WCDPLUS114 EVB does have an external flash built in within the module. This is why your first OTA trial succeeds, I'm not sure about the exact size of flash (you can contact the manufacturer), but my guessing its 1MB. I think this is the cause of your problem. The flash size is not enough to take the test console application (as it is big). To test this, comment:

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

          in ota_fr.mk. This will make the build system not put the FR application in to external flash, you will then have a room to put the console application. This is offcourse for test purposes only. Try again to do OTA with the console app.


          The factory reset wouldn't work at this point offcourse, only the OTA (over the air upgrade).




          1 of 1 people found this helpful
          • 2. Re: OTA upgrade without FR on 3.1.2

            Hi Bassem,

            Thanks for your feedback.


            capture from SDK3.1.2



            #define DCT_FR_APP_INDEX                      ( 0 )

            #define DCT_DCT_IMAGE_INDEX                ( 1 )

            #define DCT_OTA_APP_INDEX                    ( 2 )

            #define DCT_FILESYSTEM_IMAGE_INDEX  ( 3 )

            #define DCT_WIFI_FIRMWARE_INDEX        ( 4 )

            #define DCT_APP0_INDEX                          ( 5 )

            #define DCT_APP1_INDEX                          ( 6 )

            #define DCT_APP2_INDEX                          ( 7 )



            capture from WICED-Application-Framework-April-2013.pdf



            1. Would you please help to clarify the internal/external flash partition? which INDEX stored in internal/external flash.

            2. my test scenario is snip.ota_fr-BCM9WCDPLUS114 download run without download_apps(download to external flash), as my understand my external flash should be null. from the wiced_ota_server.c, the ota is update DCT_APP0_INDEX.

            My question is when I perform ota download run then into ota process, the app0_index is mean internal or external flash ?



            • 3. Re: OTA upgrade without FR on 3.1.2


              Thanks for the information.


                For the factory reset APP,   Flash map is different from 43362 and 4390.


                With all your information, we tested again FR APP.

              1. Factory APP is copied well. ( test.console  project, snip.dct_read_write project, our own project)

                   All works fine.

              2. Factory DCT is not copied well, we got the garbage data.


              To duplicate this problem, please check this way.

                1)  snip.dct_read_write-BCM94390WCD2-FreeRTOS-LwIP download download_apps run

                2) add following information at the .mk file

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

                       DCT_IMAGE := $(OUTPUT_DIR)/DCT.bin

              3) Description :

                        snip.dct_read_write print MFG /WiFi/User DCT to console.

                        so after downloading the APP. it display all information.

              4) After checking the console display

                   Do the Factory Reset

                  1. Pressing SW1 and click Reset button.

                  2. After 5 seconds releaseing the SW1 button

                  3. With above two action, it does FR operation.

                  4. FR_APP and FR DCT is copied.

                  5. Module run and display Garbage DCT information.


                In 43362 module, it works fine.

                In 4390 Module, it make DCT data problem


              This is DCT data problem so if you test other project, The project should have user DCT.

              In my case, I put the User DCT and WiFi DCT in make file.



              • 4. Re: OTA upgrade without FR on 3.1.2



                  This issue is solved via technical supports from Broadcom


                It is our mistake to download DCT image in .mk file.  we put the DCT.bin file

                but  it should be stripped elf file.


                Valid >

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

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

                Inalid >

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

                #DCT_IMAGE := $(OUTPUT_DIR)/DCT.bin


                This mistake drive me another side effects in using API call result= wiced_dct_restore_factory_reset();


                By configuring the .mk file, all works fine and API also works fine.


                Thanks all