Skip to main content
PyKe
Associate III
June 10, 2021
Solved

Write & Read to SDRAM with STM32H743

  • June 10, 2021
  • 7 replies
  • 4681 views

Hello,

I want to write and read from an external SDRAM using an STM32H743. I never did this project before and I did not find any example of project to help me.

Please can you point me to good example of project "SDRAM/FileSystem" ?

Thank you.

This topic has been closed for replies.

7 replies

TDK
TDKBest answer
June 10, 2021
"If you feel a post has answered your question, please click ""Accept as Solution""."
Mike_ST
ST Technical Moderator
June 10, 2021

Please look for STM32H7 firmware package and check the following examples :

For SDRAM:

STM32Cube_FW_H7_V1.9.0\Projects\STM32H743I-EVAL\Examples\FMC

For FatFs File system :

STM32Cube_FW_H7_V1.9.0\Projects\STM32H743I-EVAL\Applications\FatFs

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. 
PyKe
PyKeAuthor
Associate III
June 11, 2021

@TDK​  @Mike_ST​ 

Thank you for answers !

I tried the exemple on the STMH7B3I_EVAL, on my STM32H743 ! But it's not working when i check the adress on SDRAM to see if the data was written or not i find nothing.

I literaly copied the same code from the exemple project of writing and reading with aTxBuffer/aRxBuffer buffers. I checked the Hal_MSP file where the project implements these functions :

-MX_FMC_Init function()

-HAL_SDRAM_MspInit()

-HAL_SDRAM_MspDeInit()

-HAL_FMC_MspInit()

-HAL_FMC_MspDeInit()

Everything seems to be right to me, the configuration of the pins is OK i checked the datasheet of the mcu.

In the main.h i changed the SDRAM_BANK_ADDR  from  ((uint32_t)0xD0000000) to ((uint32_t)0xC0000000) because i dont have the same SDRAM

I attached screens of the integrality of the functions and code of the project !

Thank you in advance for your help !

PyKe
PyKeAuthor
Associate III
June 11, 2021

I couldnt send here all the screens of the functions

PyKe
PyKeAuthor
Associate III
June 11, 2021

i zipped them in this file maybe this works !

Mike_ST
ST Technical Moderator
June 11, 2021

Hello,

Sending screenshots of your code is not convenient at all.

>> I tried the exemple on the STMH7B3I_EVAL

Why not from H743 EVAL ?

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. 
PyKe
PyKeAuthor
Associate III
June 15, 2021

Hello Mr Mike,

I will send files for the next times its easy to copy past code from files for testing right !

The two FMC exemples are pretty much the same. But i understand why you wanted me to go on the same MCU i'm working with :)

After few changes on the code my application is working now i can write on the SDRAM and read from it what i wrote !

Thank you so much guys @Mike_ST​  @TDK​