How to Use SPI Flash for General Storage? (CYW943907AEVAL1F)

Tip / Sign in to post questions, reply, level up, and achieve exciting badges. Know more

cross mob
ChMa_3922746
Level 5
Level 5
10 likes received 10 likes given 5 likes given

I have been storing user data in APP DCT.  However, it appears that the avail. space is limited to ~ 4KB on the CYW943907AEVAL1F.

Therefore, I am interested in using free sectors in the 8MB of SPI Flash for storing nonvolatile data.  I have dug around the forum and the SDK code and haven't come up with a good strategy for this.  I have come across spi_flash.c, but it isn't clear to me how to preserve sectors in Flash during the build for this, or how to access this space using the routines provided.

Has anyone done this, and if so, do you have any recommended methods/function calls?  I think the minimum would be:

1. Allocate sectors in SPI flash during build.

2. SPI flash functions to:  erase sector, read sector and write sector.

Thanks!

0 Likes
1 Solution
RaktimR_11
Moderator
Moderator
Moderator
500 replies posted 250 replies posted 100 replies posted

We usually recommend to store the data in APP DCT for this type of use-case. As you need to store a large amount of data, you can investigate the staging area concept for sflash. sflash related details for WICED SDK can be found at SFLASH support addition in WICED

View solution in original post

3 Replies