8 Replies Latest reply on Jun 18, 2019 4:58 AM by PriyaM_16

    OTA Method for CYW43438+STM32F412

    goto-t_2353976

      Hi,

       

      As I'm checking OTA2 manual and some forum column but I'm not sure something so please tell me following parts.

       

      HW platform; STM32F412 + CYW43438.

       

      Q1: Can we use both of OTA and OTA2 for this HW combination.

      I'm sure Yes but it is for double check.

       

      Q2: According to OTA2 documents, it seems to show only "PUSH method" using SoftAP and Webserver in the WICED.

             Is there any sample application to configure "PULL method" by OTA and/or OTA2 ?

             e.g:

              1.Assert GPIO

              2. WICED try to download OTA2_Image from the internet like a webserver or FTP server.

              3.Extract image in the WICED starting address.(I think this operation is handled by OTA2_extract)

       

           PULL method is very popular in IoT application, such as white goods.

       

      Thank you.

       

      --TAK

        • 1. Re: OTA Method for CYW43438+STM32F412
          PriyaM_16

          Hello,

          Please find my answers inline:

          Q1: Can we use both of OTA and OTA2 for this HW combination. I'm sure Yes but it is for double check.

          >> You can use OTA for the mentioned platform

           

          According to OTA2 documents, it seems to show only "PUSH method" using SoftAP and Webserver in the WICED. Is there any sample application to configure "PULL method" by OTA and/or OTA2 ?

          >> OTA2 has a timed update feature where it periodically connects to a server and downloads the image in the background if valid image is present on the server.

           

          I think this thread would be helpful for further understanding the differences between OTA and OTA2: Key differences between OTA and OTA2 in WICED?

          • 2. Re: OTA Method for CYW43438+STM32F412
            goto-t_2353976

            Hi,

             

            >Q1: Can we use both of OTA and OTA2 for this HW combination. I'm sure Yes but it is for double check.

            >>> You can use OTA for the mentioned platform

             

            First of all,  do you mean this platform can use OTA,not OTA2 ?

            According to "WICED-OTA2.pdf" document, STM32F412 CPU seems to support it.

             

            "OTA2  is  supported  on  BCM94390x  and  STM32F4xx  platforms  under  ThreadX."

             

            Thank you.

             

            --TAK

            • 3. Re: OTA Method for CYW43438+STM32F412
              goto-t_2353976

              Hi,

               

              I'm assuming that my IC combination support OTA2.

               

              >>> OTA2 has a timed update feature where it periodically connects to a server and downloads the image in the background if valid image is present on the server.

               

              According to "12  OTA2 Update Service Library API " in "WICED-OTA2.pdf" document,

              I understand these APIs can be used to download OTA2_Image from customer server then update FW automatically.

               

              Is that right?

               

              If so , is there any sample application to use these APIs since we can not understand how to use these APIs clearly by only this document.

               

              Thank you.

               

              --TAK

              • 4. Re: OTA Method for CYW43438+STM32F412
                PriyaM_16

                OTA2 is not suppoerted in STM based devices due to the following reasons:

                1. The RAM requirements for OTA2 is nearly 640KB.

                If an example application is 256 KB, the RAM requirement is nearly 336KB. Adding OTA2 functionality to that application increases the RAM requirements to ~640KB.

                2. The flash requirement for OTA2 is about 8MB. If the device do not have enough internal flash, we can use system with external flash. The internal + external flash combination should be able to fulfil the requirements for OTA2.

                 

                If your system fulfils the above two requirements, OTA2 can be used.

                 

                As most of the EVK with STM processor do not satisfy the mmeory requirements, only OTA is supported in such platforms.

                1 of 1 people found this helpful
                • 5. Re: OTA Method for CYW43438+STM32F412
                  goto-t_2353976

                  Hi OK, understood.

                   

                  We will use "STM32F412RGY6TR"  that has only 256KB RAM so I understand only way is OTA.

                   

                  Q1:

                  I understand OTA can support downloading WICED application ony, can not update WICED library and something like that.

                  Is that right?

                   

                  I'm concerned about if vulnerable is happened, WICED library should be changed.

                  OTA can not support this situation , is that right ?

                   

                  Q2:

                  Does OTA support "PULL" method FW downloading which means following situation?

                   

                  1. MCU recognize GPIO sense

                  2. MCU start to download FW from customer server via FTP or HTTP.

                  3. Store OTA image in the flash.

                  4.Extract it to current FW image.

                   

                  Thank you.

                   

                  --TAK

                  • 6. Re: OTA Method for CYW43438+STM32F412
                    PriyaM_16

                    Hello,

                     

                    Q1:

                    I understand OTA can support downloading WICED application ony, can not update WICED library and something like that.

                    Is that right?

                     

                    I'm concerned about if vulnerable is happened, WICED library should be changed.

                    OTA can not support this situation , is that right ?

                    >> Yes. The current implementation of OTA only supports updating the application firmware, not the WICED library(I am assuming you mean wifi firmware). Though the OTA can be updated to update the wifi firmware and other customer have implemented it with some difficulty.

                    You can refer the following threads: Re: Updating 4343W wifi firmware for our module via OTA

                     

                    Q2:

                    Does OTA support "PULL" method FW downloading which means following situation?

                     

                    1. MCU recognize GPIO sense

                    2. MCU start to download FW from customer server via FTP or HTTP.

                    3. Store OTA image in the flash.

                    4.Extract it to current FW image.

                    >> No. It does not support PULL method.

                    • 7. Re: OTA Method for CYW43438+STM32F412
                      iotnooob_4292956

                      I also interested in pull method. It is limitation for remote device for updating firmawre!

                      Instead of creating network, hosting page and receving bytes from device(like OTA), theoretically(with limit of RAM on chip) possible to pull binary from HTTP and update image, correct?

                      • 8. Re: OTA Method for CYW43438+STM32F412
                        PriyaM_16

                        Hello,

                        The pul method is not implemented but we can give it a thought.

                        The pull method will require you to connect to a server where the omage is hosted and check for updates. If an updated image is presenton the server, it needs to downloaded and saved.

                        This saving is the entire problem:

                        In OTA2, there is a different staged area where the image is downloaded and stored.

                        In OTA, the image is copied to the area of the APP0 itself. There is it staged area defined separately.

                        So if you can pull the binary and copy it directly to APP0, it can be done !