File system support on MT29F1G NAND Flash with STM32F7
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2025-04-29 5:08 AM - last edited on ‎2025-04-29 5:59 AM by mƎALLEm
hi i have a system with two flash memories, one nor and one nand. i need a filesystem supported especially for the nand. which one can i use? are there any examples of support?
- Labels:
-
STM32F7 Series
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2025-04-29 10:16 AM - edited ‎2025-04-29 10:16 AM
Hello @Giovanni3,
The reference FatFs applications within the STM32CubeF7 firmware packages are based on the hardware memory resources available on STM32F7 boards. The available resources include uSD, USBDisk, and RAMDisk memories, but no NAND memory is available.
However, you can customize the diskio.c/.h
files to interface with any specific memory.
Example Code Snippet
Here's a simplified example of how you might set up the disk I/O interface for FatFs:
#include "ff.h" // FatFs header
#include "diskio.h" // Disk I/O header
#include "nand_driver.h" // Your NAND flash driver header
DSTATUS disk_initialize(BYTE pdrv) {
if (nand_init() == NAND_OK) {
return RES_OK;
}
return STA_NOINIT;
}
DRESULT disk_read(BYTE pdrv, BYTE* buff, DWORD sector, UINT count) {
if (nand_read(sector, buff, count) == NAND_OK) {
return RES_OK;
}
return RES_ERROR;
}
DRESULT disk_write(BYTE pdrv, const BYTE* buff, DWORD sector, UINT count) {
if (nand_write(sector, buff, count) == NAND_OK) {
return RES_OK;
}
return RES_ERROR;
}
With Regards,
Anis
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2025-04-30 12:22 AM
Hi. yes, i realized that, but how do i manage erase of blocks and modifying a file created in fat?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2025-05-14 6:14 AM
@Giovanni3 wrote:
Hi. yes, i realized that, but how do i manage erase of blocks and modifying a file created in fat?
This can be done using FATFS API.
Saket_Om
