spi flash filesystem

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

cross mob
EyLa_3227556
Level 3
Level 3
10 replies posted 5 replies posted 10 questions asked

Hello,

We are considering using spiflash in our design (SDK 6.4) for sensor data storage.

We are looking into implementing a NAND flash as the deign is cost sensitive.

As I understand (link), NAND flash has some bad blocks and its overall write reliability is reduced compared to NOR flash.

Is there any implementation in the SDK of file system running on top of NAND flash (taking care of bad blocks)?

Can such NAND flash be used as temp storage of the OTA image ?

If not, can you refer to a NOR flash implementation/guidelines of such filesystem.

Can such flash be used both for OTA image storage as well as real-time data storage?

Thanks

0 Likes
1 Solution
Murali_R
Moderator
Moderator
Moderator
250 sign-ins 250 replies posted 100 solutions authored

Hello EyLa_3227556

As far as i'm aware, there's no implementation in WICED taking care of the bad blocks of NAND flash as NAND read/write requires to take care of the FTL which should include wear leveling, bad sector handling.

Unfortunately, there's no such implemenation for NOR flash also in WICED.

You can check out other implementations such as yaffs-direct-interface in yaffs : https://yaffs.net/documents/yaffs-direct-interface  or levelx : GitHub - azure-rtos/levelx: Azure RTOS LevelX Provides Flash Wear Leveling for FileX and Stand Alone...

If you are using a xx907 based platform, this by default uses the external flash for all its operations, so yes, the flash can be used for both OTA image storage as well as real-time data storage.

Thanks

View solution in original post

4 Replies
Murali_R
Moderator
Moderator
Moderator
250 sign-ins 250 replies posted 100 solutions authored

Hello EyLa_3227556

As far as i'm aware, there's no implementation in WICED taking care of the bad blocks of NAND flash as NAND read/write requires to take care of the FTL which should include wear leveling, bad sector handling.

Unfortunately, there's no such implemenation for NOR flash also in WICED.

You can check out other implementations such as yaffs-direct-interface in yaffs : https://yaffs.net/documents/yaffs-direct-interface  or levelx : GitHub - azure-rtos/levelx: Azure RTOS LevelX Provides Flash Wear Leveling for FileX and Stand Alone...

If you are using a xx907 based platform, this by default uses the external flash for all its operations, so yes, the flash can be used for both OTA image storage as well as real-time data storage.

Thanks

Thanks.

In the case of CYW43907 & NOR spi flash, can you point out how to share same spi flash between OTA 'partition' and 'user partition' for data storage?

Thanks

0 Likes

Can you please take a look at the OTA2(\43xxx_Wi-Fi\doc\WICED-OTA2.pdf) implementation in WICED?

This implementation has a separate staging area which stores the updates once they are pushed onto the xx907 based device.. I think this is something similar to your requirement.

I also noticed that the SDK contains Wiced\internal\wiced_filesystem.c module as well as Libraries\Filesystems folder.

How these can be used to create a 'file access partition' on the vacant part of the spi flash for data storage (using open/read/write/close api)

Is there any documentation /sample project to demonstrate how all of this fits together?

Thanks

0 Likes