Skip to main content
pk84
Associate III
October 17, 2022
Question

adapt LTDC_Paint example (STM32H750 Discoboard) for another external SDRAM

  • October 17, 2022
  • 4 replies
  • 1938 views

Hello,

Based on the example LTDC_Paint for the STM32H750 Discoboard I try to adapt the software to run with 2x W9825G6KH SDRAM instead of the IS42S32400F-6BL.

The program is loaded from an external flash (QSPI).

I thought that I just have to adjust the function BSP_SDRAM_Init() in the "BSP_LCD_Init(0, LCD_ORIENTATION_LANDSCAPE)" function.

Unfortunately the display still shows nothing. I can measure the SDRAM clock (100 MHz) as well as the pixel clock.

But here I have to say, that the program crashes (resp. doesn't come into the while loop), if the functions UTIL_LCD_FillCircle... in the function Draw_menu();. are not commented out.

Troubleshooting is difficult, respectively I try with LED at the moment..

I suspect that the memory/addresses are set/read completely wrong....

Does somebody have some hints that I should still check? Should I also adjust something in the build/debug configuration or in the linker file?

Thanks

This topic has been closed for replies.

4 replies

pk84
pk84Author
Associate III
October 17, 2022

from the Winbond driver I missed a function called "my_mem_init" - it has something to do with malloc. But now I get a RAM overflow error, see screenshots below.

Where and how can I adjust the SDRAM size?

0693W00000UoCj8QAF.png 

0693W00000UoCiZQAV.png

Tesla DeLorean
Guru
October 17, 2022

The size of the memory would get described in the linker script, and results in data fitting or not.

The SDRAM should perhaps be described separately than the internal SRAMs so that large buffers/structures of lesser criticality get pushed into the slower memory.

And content directed via __attribute__((section("name")))  at the compiler/definition level.

Tips, Buy me a coffee, or three.. PayPal Venmo (See Profile) Up vote any posts that you find helpful, it shows what's working..
pk84
pk84Author
Associate III
October 17, 2022

sorry, but unfortunately I only understand "spanish"...

And what does SRAM have to do with SDRAM? I change only the SDRAM.

How do I change the SDRAM-size in the linkerscript from 128M to 256M ?