cancel
Showing results for 
Search instead for 
Did you mean: 

STM32F7 SDRAM configuration for heap, stack and LTDC buffer (STM32F769-DISCO)

TDJ
Senior III

There are examples on how to set up SDRAM on STM32F769-DISCO board but I found no comprehensive example of what I think should be the default setup for this board: SDRAM configured for heap, stack and 2MB LTDC buffer reserved.

So far I figured out SDRAM and FMC ought to be set up upon SystemInit(), typically within SystemInit_ExtMemCtl() method (mbed-os 5). Example of a proper implementation can be found here.

However, I am not sure if:

  • additional GCC linker script modifications are required,
  • startup code in startup_stm32f769xx.s needs to be altered,
  • LTDC buffer can be set up later, how?
  • MPU needs to be set up as well and how?

Could someone point me to the right direction please?

2 REPLIES 2

I believe there are a number of comprehensive examples setting up a combination of things as described.

You only need to tell the linker about memories you want it to allocate.

The startup.s will need to unpack whatever initialization data you need copied into SDRAM. Better to make SDRAM a NOINIT or NOLOAD section.

SDRAM access can be done with pointers, using absolute values, and without the involvement of the linker or startup code.

GNU/GCC have a level of crudeness not seen in Keil and IAR which are better suited to embedded work out of the box. The cost tradeoff is you have to own the implementation tasks, and the mechanics.​

For video frame buffers you likely want to disable caching and write back behaviour on the region involved. Check ConfigMPU() examples and default attributes for memory addresses used.​

Tips, Buy me a coffee, or three.. PayPal Venmo
Up vote any posts that you find helpful, it shows what's working..
TDJ
Senior III

Have you come across any comprehensive example?

I mean, every point I listed, even with your tips I truly appreciate for a newbie like myself requires hours of further research.

I already spent four evenings going through different newsgroup and posts to learn what I still need to discover.

I am really thankful that community members like yourself are willing to help but since you probably answered similar question several times before and they keep popping up that may indicate some more detailed and comprehensive paper (application note?) would be widely appreciated.