Skip to content

SystemInit_ExtMemCtl(), DATA_IN_ExtSDRAM and SDRAM support #12770

@tdjastrzebski

Description

@tdjastrzebski

Looking for the right way of using external SDRAM memory on my DISCO_F769NI board I found this official document on STM32F7 Series system architecture and performance - AN4667 Application note.
According to this document:

DATA_IN_ExtSDRAM: if defined in the configuration project, the SDRAM is configured to be used either for data storage or for code execution.

But I figured that mbed-os 5 does not support DATA_IN_ExtSDRAM macro, at least not for DISCO_F769NI target.
What is more, it seems that the new way is to define own HAL_SDRAM_MspInit() methof or some MspInitCallback() which gets called from HAL_SDRAM_Init().
However, unlike SystemInit_ExtMemCtl() HAL_SDRAM_Init() is not executed upon system start from SystemInit().
Also, I found SystemInit_ExtMemCtl() is mentioned in startup_stm32f769xx.s file - some publications say that it should be invoked from there but I am not sure it really is.

I am not asking just how to make SDRAM working - there are some examples available.
I am asking how to do it the right, mbed-os 5/6 way so I can submit PR and make sure next release will not overwrite necessary OS changes - if any are required.

Also, probably LTDC buffer and DMA, should be set up at the same, early stage. What is the recommended pattern?

Could some architect point me to the right direction, please?

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions