cancel
Showing results for 
Search instead for 
Did you mean: 

Wi-Fi Combo

MuOr_1658816
Contributor

How can I store large amounts of data (about 128kb) downloaded from a server on the platform using WICED?

0 Likes
1 Solution
Anonymous
Not applicable

Hi Mustafa,

You can store your data in a serial flash. Please take a look at Wiced/Platform/common/drivers/spi_flash/spi_flash.h for the readily available SPI flash API.

WICED evaluation boards come with a serial flash. Which WICED board are you using for your evaluation?

Regards,

Aji

View solution in original post

4 Replies
Anonymous
Not applicable

Hi Mustafa,

You can store your data in a serial flash. Please take a look at Wiced/Platform/common/drivers/spi_flash/spi_flash.h for the readily available SPI flash API.

WICED evaluation boards come with a serial flash. Which WICED board are you using for your evaluation?

Regards,

Aji

View solution in original post

MuOr_1658816
Contributor

Hi Aji,

How can I make sure that the OTA is not going to overwrite the content?

Thanks

mustafa

0 Likes
Anonymous
Not applicable

Mustafa,

During OTA upgrade app downloading, WICED uses waf.sflash_write (serial flash writer app) in conjunction with OpenOCD and a TCL script to write the OTA upgrade application to the serial flash.


You may store your data after the OTA upgrade app or shift the OTA upgrade app and store your data at the start of the serial flash. Both ways you need to make sure they can fit into the serial flash.


A few example apps to look at:

- Apps/snip/ota_fr - OTA and factory reset app

- Apps/waf/ota_upgrade - example OTA upgrade app that is written into the serial flash

- Apps/waf/sflash_write - serial flash writer app


Regards,

Aji

0 Likes
Anonymous
Not applicable

An alternative solution and more complicated solution is to extend the DCT (Device Configuration Table) to suit your need, although this approach really depends on the size of the data to store and the internal flash sector size of the MCU.

Note that the DCT uses two DCT blocks which are erased and written alternately. Consequently, enlarging the DCT area also reduces the amount of space available for your application.

Regards,

Aji