Skip to main content
jlecl.1
Associate III
April 10, 2023
Question

External Flash as WinBond W25qxx and USB mass Storage

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 ?

This topic has been closed for replies.

3 replies

Tesla DeLorean
Guru
April 10, 2023

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 (See Profile) Up vote any posts that you find helpful, it shows what's working..
jlecl.1
jlecl.1Author
Associate III
April 10, 2023

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

Tesla DeLorean
Guru
April 10, 2023

>>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 (See Profile) Up vote any posts that you find helpful, it shows what's working..