11 Replies Latest reply on Aug 14, 2019 3:52 AM by GrCa_1363456

    Hibernation bricking with CYW43907

    GrCa_1363456

      What could cause bricking issues when using OTA2 and Hibernation on a Murata Type 1GC (CYW43907).

       

      The issue is happening when using OTA2 service with Hibernation. For Hibernation cycle, after a certain amount of time the device is put in hibernate for a few minutes then woke up to check some data then revert back into hibernation and the cycle repeats. At around 50 to 150 hibernation cycles, the module gets bricked. The only way to recover is to flash the module using JTAG. This bricking is happening only when OTA2 daemon is enabled in the code.

       

      To recreate this issue, merge ota2 snippet that comes with WICED SDK 6.2.1 (snip.ota2_example) and hibernation example from Community Post from Oct 2018, "43xxx_wifi Hibernate.c in WICED 6.2.1?" @(https://community.cypress.com/message/176648#176648).

        • 1. Re: Hibernation bricking with CYW43907
          ZhengbaoZ_96

          hello:

           

          if it is ok to share your application to me for a try , thanks.

          • 2. Re: Hibernation bricking with CYW43907
            kiFo_3714346

            Hi you'll find the most barebone example in attachement in order to reproduce the issue.

             

            Greg Crarson has provided a fix for their Quicksilver platform memory map (in attachement) when using OTA2 which fix the failsafe from launching and as a result brick the device.

             

            But the reason why the failsafe is trigered at the first place is still a mistery. We see that the wiced_init() is failling around the creation of the packet pool.

             

            So if you can give us insight on how to prevent the wiced_init() to fail would be an huge help.

             

            Thanks in advance,

            Kim

            • 3. Re: Hibernation bricking with CYW43907
              ZhengbaoZ_96

              Hello:

                just have a test based on 43907AEVAL1 with 6.2.1.2 .

              every time the code will have a reset log output after entering hibernation, is that same behavior in your test ?

               

              Hibernation test application

              Frequency 32771 maximum ticks 0xffffffff

              Returned from hibernation: spent there 1966380 ticks, 60003 ms

              After short sleep will hibernate for 60000 ms

              H▒

              Starting WICED vWiced_006.002.001.0002

              Platform CYW943907AEVAL1F initialised

              Started ThreadX v5.8

              Initialising NetX_Duo v5.10_sp3

              Creating Packet pools

              WLAN MAC Address : A4:08:EA:D9:C9:A4

              WLAN Firmware    : wl0: May 15 2018 19:39:17 version 7.15.168.114 (r689934) FWID 01-d6f88905

              WLAN CLM         : API: 12.2 Data: 9.10.74 Compiler: 1.31.3 ClmImport: 1.36.3 Creation: 2018-05-15 19:33:15

              >

              Config Info: * = dirty

              OTA2 App DCT:

                         reboot_count: 4

                        version major: 1

                        version minor: 0

                reboot after download: 0

                   Default Update URI: 192.168.1.48/OTA2_image_file.bin

              OTA2 System DCT:

                update_count        : 0

                boot_type           : 0 OTA2_BOOT_NEVER_RUN_BEFORE

                force_factory_reset : 0

              Network DCT:

                     Interface: STA

                      Hostname: WICED IP

                       IP addr: 0.0.0.0

              WiFi DCT:

                WICED MAC (STA): a4:08:ea:d9:c9:a4

                            MAC: 00:a0:50:e3:eb:99

                           SSID: 5g

                       Security: wpa2aes

                     Passphrase: 12345678

                        Channel: 153

                           Band: 5GHz

              Current:

                       Channel: 36

                          Band: 5GHz

               

               

              Joining : 5g

              Successfully joined : 5g

              Obtaining IPv4 address via DHCP

              DHCP CLIENT hostname WICED IP

              IPv4 network ready IP: 192.168.1.22

              Setting IPv6 link-local address

              IPv6 network is not ready

               

               

               

               

              Hibernation test application

              Frequency 32769 maximum ticks 0xffffffff

              Returned from hibernation: spent there 1966260 ticks, 60003 ms

              After short sleep will hibernate for 60000 ms

              H

              • 4. Re: Hibernation bricking with CYW43907
                ZhengbaoZ_96

                and if below logs are your questions.

                 

                Hibernation test application

                Frequency 32771 maximum ticks 0xffffffff

                Returned from hibernation: spent there 1966140 ticks, 59996 ms

                After short sleep will hibernate for 60000 ms

                H▒

                Starting WICED vWiced_006.002.001.0002

                Platform CYW943907AEVAL1F initialised

                Started ThreadX v5.8

                Initialising NetX_Duo v5.10_sp3

                Creating Packet pools

                 

                 

                OTA2_Failsafe: Started ...

                 

                 

                OTA2_Failsafe: Extract Factory Reset

                OTA2_Failsafe Extraction Failed !!!

                1 of 1 people found this helpful
                • 5. Re: Hibernation bricking with CYW43907
                  kiFo_3714346

                  Yes it's the same behaviour that i have

                  • 6. Re: Hibernation bricking with CYW43907
                    kiFo_3714346

                    Yes exactly, why after the "Create packets pool" we are entering the failsafe and his there a fix to prevent that from happening?

                    • 7. Re: Hibernation bricking with CYW43907
                      ZhengbaoZ_96

                      Seems Factory Reset area image was broken if failsafe application can run well.

                      • 8. Re: Hibernation bricking with CYW43907
                        ZhengbaoZ_96

                        Hello:

                         

                        I am doing more tests based on your release,  The failure what I have met in last reply is due to I didn't follow the OTA2 building process.

                        then in my tests today below are the results:

                        1.  firstly , I am sure if no hibernation function added for the test, the flow is good .

                           and didn't modify any code include the .mk modification.

                         

                        2.  then add the hibernation modification into the code.

                           2.1  because there has a 60s hibernation,  the board will be triggered to reset in the reason of watchdog I think.

                           2.2  in my test most of the time is just reboot to sleep again,  but I really find a factory recovery in the condition that I didn't push the key in           the process.  This is strange.   because my factory image is same with what I am testing /OTA2_example,  it went back for the loop           again.

                         

                        Would you please try to change nothing firstly for the hibernation function test ?

                        just add the hibernation code, do not modify the OTA2 image table address.

                        • 9. Re: Hibernation bricking with CYW43907
                          GrCa_1363456

                          ZhengbaoZ_96

                           

                          Is there any documentation on the expected handshaking or suggested methods on how to record the handshakes during a normal operation of “Create packet pool”?

                           

                          The primary question here is: What could cause a device to hang after “Create packet pool”?

                          There appears to be an interaction with a local WiFi when “Create packet pool” is executed. The device appears to be stuck waiting for a response.

                           

                          Note: If the hibernation time is changed the code still occasionally hangs after “Create packet pool”.

                           

                          Greg

                          • 10. Re: Hibernation bricking with CYW43907
                            ZhengbaoZ_96

                            Hello:

                             

                              Actually, I didn't duplicate the scene for occasionally hangs after “Create packet pool”.

                            The tests what I am doing according the code uploaded are rebooting always after going to hibernation.

                            Did you disable watchdog for the tests?  Would you please point out where has a potential hang issue after your modification ?

                            and better not to modify the ota2 makefile firstly .

                            • 11. Re: Hibernation bricking with CYW43907
                              GrCa_1363456

                              Lisa,

                               

                              The log output in the response #4

                              4. Re: Hibernation bricking with CYW43907

                              ZhengbaoZ_96Level 7

                               

                              shows the code hang after "Creating Packet Pools"

                              Hibernation test application

                              Frequency 32771 maximum ticks 0xffffffff

                              Returned from hibernation: spent there 1966140 ticks, 59996 ms

                              After short sleep will hibernate for 60000 ms

                              H▒

                              Starting WICED vWiced_006.002.001.0002

                              Platform CYW943907AEVAL1F initialised

                              Started ThreadX v5.8

                              Initialising NetX_Duo v5.10_sp3

                              Creating Packet pools

                               

                               

                              OTA2_Failsafe: Started ...

                               

                               

                              OTA2_Failsafe: Extract Factory Reset

                              OTA2_Failsafe Extraction Failed !!!

                               

                              If the above log output was NOT created from your test, where did that output come from?

                              If the above log output was created from your test, you were able to re-create the issue where the code hangs after Creating Packet Pools.

                              Note, the log output above successfully goes into, then comes out of Hibernation per the lines:

                              After short sleep will hibernate for 60000 ms <-- Going into Hibernation

                              H▒                              <-- During Hibernation

                              Starting WICED vWiced_006.002.001.0002 <-- Coming out of Hibernation

                               

                              The question is why the code hangs after "Creating Packet Pools"

                               

                              Greg