cancel
Showing results for 
Search instead for 
Did you mean: 

Write & Read to SDRAM with STM32H743

PyKe
Associate III

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.

1 ACCEPTED SOLUTION

Accepted Solutions
TDK
Guru

Here's an SDRAM example:

https://github.com/STMicroelectronics/STM32CubeH7/blob/ccb11556044540590ca6e45056e6b65cdca2deb2/Projects/STM32H7B3I-EVAL/Examples/FMC/FMC_SDRAM/Src/main.c

Filesystems are not typically used with SDRAM.

If you feel a post has answered your question, please click "Accept as Solution".

View solution in original post

7 REPLIES 7
TDK
Guru

Here's an SDRAM example:

https://github.com/STMicroelectronics/STM32CubeH7/blob/ccb11556044540590ca6e45056e6b65cdca2deb2/Projects/STM32H7B3I-EVAL/Examples/FMC/FMC_SDRAM/Src/main.c

Filesystems are not typically used with SDRAM.

If you feel a post has answered your question, please click "Accept as Solution".
Mike_ST
ST Employee

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

PyKe
Associate III

@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
Associate III

I couldnt send here all the screens of the functions

PyKe
Associate III

i zipped them in this file maybe this works !

Mike_ST
ST Employee

Hello,

Sending screenshots of your code is not convenient at all.

>> I tried the exemple on the STMH7B3I_EVAL

Why not from H743 EVAL ?

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​