cancel
Showing results for 
Search instead for 
Did you mean: 

SDRAM initialisation with CubeMX

Dominik Dráb
Associate II
Posted on February 26, 2018 at 01:01

Hi, I was trying to get SDRAM working on custom board with STM32F746. After I calculated timing parameters and generated code with CubeMX i tried to write and read some data form SDRAM, but it always ended in hard fault.

I expected memory initialisation to be OK, because according to UM1905 (HAL user manual), I should be able to write/read after calling HAL_SDRAM_Init().

0690X00000609oYQAQ.png

As you can see, from the text it seems that SDRAM initialisation sequence (3d) IS part of  HAL_SDRAM_Init(), but in fact it is not. After I added BSP_SDRAM_Initialization_Sequence() from discovery board example to my code, read/write is working.

So if I understand correctly, step 3d should be instead separate step and it means that the user is supposed to implement his own initialisation sequence. 

#sdram
0 REPLIES 0