Skip to main content
rkuma.21
Associate II
June 25, 2024
Question

Need to Access External Flash memory as File System

  • June 25, 2024
  • 3 replies
  • 1676 views

Hi STM Team,

I need to access test.wav audio file from External SPI Flash memory.

Is there is any file system library to mount spi flash memory as file system?

I am using Nucleo - G070RB.

Is there is any microcontrollers with library that support external flash memory as file system.

Please provide me the suggestions.

This topic has been closed for replies.

3 replies

Tesla DeLorean
Guru
June 25, 2024

With FATFS you put your Read and Write functionality in the DISKIO layer. For QSPI NOR Flash devices use 4KB sectors, as this matches the Erase size and reduces complications. Write as 16 256-byte pages.

Routines translate blocks into linear address within the memory.

Tips, Buy me a coffee, or three.. PayPal Venmo (See Profile) Up vote any posts that you find helpful, it shows what's working..
rkuma.21
rkuma.21Author
Associate II
June 26, 2024

@Tesla DeLorean Thanks for your reply.

 

Is already have any library to read and write files to SPI flash memory, please suggest any.

ST Technical Moderator
June 26, 2024

Hello @rkuma.21 

 

For integrating FatFS with external flash, you would need to write a disk I/O driver specific to your SPI flash, similar to the sd_diskio driver mentioned for SD cards in this example.

Unfortunately, there is no example provided by ST in the Firmware package. However, you can refer to these threads:

 

In order to give better visibility on the answered topics, please click on 'Best answer' on the reply which solved your issue or answered your question. Saket_Om