Skip to main content
Associate II
May 21, 2024
Question

FATFS on W25Q128JV

  • May 21, 2024
  • 2 replies
  • 1216 views

I have interfaced the W25Q128JV with the STM32F407G-DISC1 board. Is there any way that I can implement the FATFS on the W25Q128JV. If someone has any example code for the same, can you please share the link for it?

2 replies

Tesla DeLorean
Guru
May 21, 2024

Sure, but it's not going to be particularly fast.

You want to used 4KB sectors, not 512-Byte ones.

You'd code in support for read, and erase+write into the DISKIO layer, reporting the number of blocks.

Use JEDEC Read ID to read part and infer capacity, and 4KB blocks, or hard code for a single part/model

The DISKIO routines for Read would convert sector to 4KB block address within part. The Write would need to Erase the 4KB block, wait for completion and then write the content as some consecutive 256-byte page writes, and waits

Tips, Buy me a coffee, or three.. PayPal VenmoUp vote any posts that you find helpful, it shows what's working..
urbito
Senior II
May 22, 2024

I have made a quick read on the DS from your device, not sure if it would work but, maybe you can try to use it in QSPI mode and also implement FileX + LevelX ?

 

Just a suggestion, LevelX has couple of example projects for QSPI or OSPI in the CubeIDE.

 

Greetings

Tesla DeLorean
Guru
May 22, 2024

The F407 doesn't support QSPI/OSPI directly, but the abstractions would be similar, ie sector-to-address read of the memory for the READ, erase and page writes for the WRITE

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