HAL library 11- SDRAM for STM32Fxxx

SDRAM library was designed to be used on STM32F429-Discovery, STM32F439-EVAL and STM32F7-Discovery boards. With single define, library will know which board is used and which settings should use to get proper working for RAM.

FMC peripheral is used for driving SDRAM.

Library

Read more about new HAL libraries

Features

  • Use SDRAM on STM32F429-Discovery board
  • Use SDRAM on STM32F439-EVAL board
  • Use SDRAM on STM32F7-Discovery board
  • Supports custom pins initialization in case user has own board with RAM
  • Supports commands for read and write different types of numbers

Dependencies

  • HAL
  • TM
    • STM32Fxxx HAL
    • defines.h
    • attributes.h
    • TM GPIO

Board pinouts

SDRAM pins are different for different board. Using proper defines (explained below) you can select which board is used.

For full pinout list, download and open SDRAM library and check header file with description.

Select board

The most important thing is to tell library, which board is used in target system. There are 2 possible ways to do that. One (and I prefer it) is to check my DISCO library and follow instructions which define you have to set for proper board, and another, explained below.

If you choose option one, then you will have no worries in my future libraries where library needs to know exactly which board is used!

The second option (I don’t prefer it) is, to set define only for this library. Copy define corresponding to your board into defines.h file or make a global defines in compiler’s settings. I made global defines in Keil uVision under “Options for Target” -> “C/C++” tab.

Functions and enumerations

Example

Project is available in Github, download all libraries 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!