FatFs library extended for SDRAM

As mentioned at the beginning of post about FATFS with SDCARD, I’ve updated library to extend support for SDRAM on STM32F429-Discovery or STM324x9-EVAL board.

Low level functions have been added in library for write/read data ti SDRAM.

SDRAM set up

To use SDRAM with my FATFS library, you will need to include my SDRAM library, which implements low level functions for read/write in SDRAM and initialization process. 

Next thing, you need to do, is to open defines.h configuration file and add define:

Functions for interface between SDRAM and FATFS are stored in fatfs/drivers/fatfs_sdram.c .h. Make sure you have included them in your project!

Low level functions for FATFS and SDRAM are now set. You can start working with mounting, opening files, everything you need.

The only problem is, that SDRAM is non-volatile memory which will not store data if there is no power. That’s the reason, why you will always have to make fat file system “on the fly” using “f_mkfs” function from FATFS. Look for example below:

defines.h

main.c

Download library update below.

tilz0R

Owner of this site. Application engineer, currently employed by STMicroelectronics. Exploring latest technologies and owner of different libraries posted on Github.

You may also like...

Read before commenting!

Before you make a new comment, make sure you agree with things listed below:

  • - Read post to make sure if it is already posted what you are asking for,
  • - Make sure you have the latest version of libraries used in your project,
  • - Make a clean and grammatically correct written message,
  • - Report as many details as possible, including what have you done so far,
  • - Do NOT post any code here. Use Pastebin,
  • - Do NOT post any error codes here. Use Pastebin,
  • - Specify STM32Fxxx family and used Discovery/EVAL/Nucleo or custom made board,
  • - Make sure your clock is set correct for PLL,
  • - If you are using my HAL drivers, please check this post how to start.
Comment will be deleted on breaking these rules without notification!