6 Replies Latest reply on Feb 7, 2020 7:30 AM by ZhengbaoZ_96

    CYW4343W - WiFi FW usage

    BeOl_4470266

      Hello,

       

      I'm prototyping a product based on a STM32L4A6 and a Murata Type 1DX radio (CYW4343W). A 64MB external flash is available for the STM32 over QSPI.

       

      What I'd like to achieve is to store the WiFi FW into the external flash (allocating 1024KB to have enough room for 2 of them and allow OTA updates). The rest of the flash would be used by the application.

       

      I'm struggling to understand how and where this WiFi FW is actually used. I understand that it is located in WICED-Studio-6.4\43xxx_Wi-Fi\resources\firmware\4343W.

       

      Thus several questions to confirm or not what my assumptions are:

       

      1. Is it actually executed by the BCM4343W or by the STM32?

      2. If executed by the BCM4343W, does it need to be loaded into its ROM by the STM32?

      3. Is there any limitation in the rest of the flash being used by my application if a part of it is used by the wiced framework to handle the WiFi FW? Do I have to use the same file system for instance?

       

      Thanks for your help,

      Best regards,

      Ben

        • 2. Re: CYW4343W - WiFi FW usage
          ZhengbaoZ_96

          1. Is it actually executed by the BCM4343W or by the STM32?

          A:  executed by 4343W

           

          2. If executed by the BCM4343W, does it need to be loaded into its ROM by the STM32?

          A:  it is loaded into inside of chip (RAM assumed, because we need to load the firmware again once wifi is powered off)  by using the interface between STM32 and 4343W.

           

          3. Is there any limitation in the rest of the flash being used by my application if a part of it is used by the wiced framework to handle the WiFi FW? Do I have to use the same file system for instance?

          A:   Yes, We can use file system, if we set to file system mode, assume wifi firmware is 200k size,

            you can see a filesystem.bin with 200k size more,   if we set to built-in , you will see you application image with a 200k size added.   We should have a make file to arrange the flash size, you can modify the file to the size you wanted.   

          1 of 1 people found this helpful
          • 3. Re: CYW4343W - WiFi FW usage
            BeOl_4470266

            Hi ZhengbaoZ_96

             

            Okay, thanks.

             

            I'd have a few other questions:

             

            4. Would the WIFI FW in the external flash be used only during wiced_core_init() or could it be used at another moment?

             

            5. My objective would be to allocate 1024KB for Wiced to use for the filesystem (just for WiFi FW) and have full control on the rest of the flash. Where should I define those boundaries?

             

            6. I have a requirement to provide OTA update capabilities for the WiFi Firmware (separately from the application). Ideally the external flash 1024KB partition allocated to it would be cut in half, and I would tell Wiced where to look for the latest firmware to use. Does it make sense given the way the WiFi FW management is done currently, or is there a simpler solution?

             

            Thanks for your help,

            Ben

            • 4. Re: CYW4343W - WiFi FW usage
              ZhengbaoZ_96

              4. Would the WIFI FW in the external flash be used only during wiced_core_init() or could it be used at another moment?

              A: No, we only download firmware  in the init stage, do not suggest to change the init flow for firmware download .

               

              5. My objective would be to allocate 1024KB for Wiced to use for the filesystem (just for WiFi FW) and have full control on the rest of the flash. Where should I define those boundaries?

              A:  for OTA , it didn't support wifi firmware update,  only support app update.

               

              6. I have a requirement to provide OTA update capabilities for the WiFi Firmware (separately from the application). Ideally the external flash 1024KB partition allocated to it would be cut in half, and I would tell Wiced where to look for the latest firmware to use. Does it make sense given the way the WiFi FW management is done currently, or is there a simpler solution?

              A:   OTA process can be modified for this wifi firmware update by using external flash + filesystem,  also need your efforts .  I think you can have a try based on OTA , then we can discuss further.

               

              This discussion may give help for your question.

              Re: Does OTA apply to MCU internal flash ?

              • 5. Re: CYW4343W - WiFi FW usage
                BeOl_4470266

                Hi,

                 

                For OTA purpose we are developing our own solution as we have cybersecurity requirements. So far we've been able to do successful OTAs updates but the WiFi Firmware was contained with the application binary. We need now to separate the two.

                 

                Here is how the external flash usage would be

                We would write the application code that will receive, check and write the WiFi Firmware to the next available slot.

                 

                7. How can I tell Wiced to use slot 1 or slot 2, given that the application will be in charge of deciding which one is the correct one?

                 

                Thanks,

                Ben

                • 6. Re: CYW4343W - WiFi FW usage
                  ZhengbaoZ_96

                  Hello:

                   

                  Hello: I just use CYW94343WWCD1 to do a test, change below setting:

                  I just use CYW94343WWCD1 to do a test, change below setting:

                  \43xxx_Wi-Fi\platforms\CYW94343WWCD1_EVB\CYW94343WWCD1_EVB.mk

                   

                  # WICED APPS LOOKUP TABLE

                  APPS_LUT_HEADER_LOC := 0x0000

                  APPS_START_SECTOR := 2  // modify from 1 to 2

                   

                  I can get below logs:

                   

                  echo Downloading resources filesystem ... build/snip.scan-CYW94343WWCD1_EVB/filesystem.bin at sector 2  size 103...

                  Downloading resources filesystem ... build/snip.scan-CYW94343WWCD1_EVB/filesystem.bin at sector 2  size 103...

                  .\tools\OpenOCD\Win32\openocd-all-brcm-libftdi.exe -s .\tools\OpenOCD\scripts -f ./tools/OpenOCD/CYW9WCD1EVAL1.cfg -f ./tools/OpenOCD/stm32f4x.cfg -f apps/waf/sflash_write/sflash_write.tcl -c "sflash_write_file build/snip.scan-CYW94343WWCD1_EVB/filesystem.bin 8192 CYW94343WWCD1_EVB-SDIO 0 0" -c shutdown >> build/openocd_log.txt 2>&1

                  echo Downloading apps lookup table in wiced_apps.mk ... build/snip.scan-CYW94343WWCD1_EVB/APPS.bin @ 0x0000 size

                  Downloading apps lookup table in wiced_apps.mk ... build/snip.scan-CYW94343WWCD1_EVB/APPS.bin @ 0x0000 size

                   

                  so the external flash size table should be:

                  first sector:  apps.bin

                  sector 1 is filesystem start address: filesystem.bin  

                   

                  The calculated process should be operated in wiced_apps.mk

                  and you can see sflash write script in above logs.