Is it possible to force format a flash file system?

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

cross mob
solo_4424221
Level 1
Level 1

We are using Cypress FFS for cypress S25FL164 chip.

We have an issue that, the files in the SPI chip are no longer accessible after period of time. We suspect some data could be corrupted (log file?)

Below are our investigations:

During power up, ionFS_zero_init() and ionFS_init() are successful.

But FFS Partition and Volume API functions such as ionFS_mount and ionFS_get_sectors always return IO Error (IONFS_EIO = -6).

The only workaround is to perform a low level full chip erase on the SPI Flash chip. After full chip erase, mount() function will return "File system was not formatted" (IONFS_ENOFMT = -33) and the format command is able create a volume and partition successfully.

Questions:

a) What is this IO Error and typically, what are the recommended steps to recover this issue?

b)  Is it possible to force format a volume? --- ionFS_format function requires the number of available sectors and we retrieve using ionFS_get_sectors() function which will return IO Error (IONFS_EIO = -6).

Appreciate any feedback!

0 Likes
1 Solution
SudheeshK
Moderator
Moderator
Moderator
250 sign-ins First question asked 750 replies posted

Hello,

One of the reasons to get IO Error (IONFS_EIO = -6) is when FFS is not able to communicate properly with flash device. Since you are observing this issue only after power up, I suspect you are not waiting enough before accessing the flash. Please see power up and power down requirements in datasheet, https://www.cypress.com/file/196886/download page 24. I have pasted the screenshot below.

pastedImage_1.png

Please make sure that you are waiting for more than 10ms before trying to mount the file system from flash device.

Also, please let me know, if you are trying to perform any other operations to flash device before trying to mount it after power up?

Thanks and Regards,

Sudheesh

View solution in original post

0 Likes
1 Reply
SudheeshK
Moderator
Moderator
Moderator
250 sign-ins First question asked 750 replies posted

Hello,

One of the reasons to get IO Error (IONFS_EIO = -6) is when FFS is not able to communicate properly with flash device. Since you are observing this issue only after power up, I suspect you are not waiting enough before accessing the flash. Please see power up and power down requirements in datasheet, https://www.cypress.com/file/196886/download page 24. I have pasted the screenshot below.

pastedImage_1.png

Please make sure that you are waiting for more than 10ms before trying to mount the file system from flash device.

Also, please let me know, if you are trying to perform any other operations to flash device before trying to mount it after power up?

Thanks and Regards,

Sudheesh

0 Likes