cancel
Showing results for 
Search instead for 
Did you mean: 

LTDC does not work with RAM

Chuev.Vladimir
Associate III

Hello.

When I loaded the array into Flash (used const) It was displayed on the screen

But as soon as I use RAM to store the image it stops displaying, I see a black square

I also can not fill the color programmatically LTDC just does not react

7 REPLIES 7

What RAM?

The LTDC needs the data in the AXIM RAM

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

0690X000006ClmyQAC.jpg

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

Thank you.

So I have to run an external SDRAM?

I was just creating an array (uint8_t image[100 * 100])

>>So I have to run an external SDRAM?

No

>>I was just creating an array (uint8_t image[100 * 100])

Pay attention to the memory region from which it gets allocated, review linker script or scatter file, and that it describes available memories properly, and that you direct allocations from the appropriate pools/sections.

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

I don't really understand.

Is it possible to put a variable in the desired area of memory without explicitly specifying an address?

I'd like the compiler to do it myself.

In linker script script there is

MEMORY
{
	DTCMRAM (xrw)      : ORIGIN = 0x20000000, LENGTH = 128K
	RAM_D1 (xrw)      : ORIGIN = 0x24000000, LENGTH = 512K
	RAM_D2 (xrw)      : ORIGIN = 0x30000000, LENGTH = 288K
	RAM_D3 (xrw)      : ORIGIN = 0x38000000, LENGTH = 64K
	ITCMRAM (xrw)      : ORIGIN = 0x00000000, LENGTH = 64K
	FLASH (rx)      : ORIGIN = 0x8000000, LENGTH = 2048K
}

Do I need RAM_D1 or RAM_D2 or RAM_D3?

>>Do I need RAM_D1 or RAM_D2 or RAM_D3?

The AXIM SRAM is in the D1 Domain, so RAM_D1

>>Is it possible to put a variable in the desired area of memory without explicitly specifying an address?

Yes, you use an attribute directive, and let the compiler/linker do their respective jobs

Something like this would be GNU/GCC syntax with suitable section definitions in the .LD file

uint8_t __attribute__ ((section (".RAM_D1"))) image[100 * 100];

Example:

\STM32Cube_FW_H7_V1.3.0\Projects\NUCLEO-H743ZI\Examples\MDMA\MDMA_LinkedList\Src\main.c

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

Thank you.

I have a result.

I copied the linker script from the project "Mdma_linkedlist ".

I fill the square with white and black once a second and here's the result.

0690X000006CmLmQAK.jpg

Perhaps I should just use an external SDRAM? It'll take time, but I'd have to do it anyway.