cancel
Showing results for 
Search instead for 
Did you mean: 

External Flash as WinBond W25qxx and USB mass Storage

jlecl.1
Associate III

Dear everyone,

I'm not able to know is it possible to add an external flash (SPI) to a MCU for saving data (FATFS) AND get the data available on USB Mass Storage.

A lot of library exist for SPI flash, the most knowed >"https://github.com/nimaltd/w25qxx/blob/master/w25qxx.c

But... what about the Mass Storage ?

3 REPLIES 3

Concurrent usage tends to be a problem due to the file system structures, and host side caching.

Yes, Winbond W25Qxx devices can be used for this application, generally you'd want to use the 4KB sector size. The NOR Flash devices are not particularly fast. FATFS doesn't manage wear-leveling, etc.

Tips, Buy me a coffee, or three.. PayPal Venmo
Up vote any posts that you find helpful, it shows what's working..
jlecl.1
Associate III

Thanks for your rapid reply.

My need does not require High speed, no big space.

i would like just memory faster than an EEProm, and stop using SDcard ( Manipulation and human errors, compatibility).

Do you is you have ever seen an example ?

My only source is a Chinesse page...

https://blog.csdn.net/changsic/article/details/125351417

>>Do you is you have ever seen an example ?

I'm a software engineer, I've written one, although in the most recent case it was QSPI on an STM32F7

For FATFS you have to implement the block read/write function in the DISKIO layer.

For USB you'd need to implement READ, WRITE, GET CAPACITY, READ MODE-PAGE type functionality.

Tips, Buy me a coffee, or three.. PayPal Venmo
Up vote any posts that you find helpful, it shows what's working..