cancel
Showing results for 
Search instead for 
Did you mean: 

Using touchgfx without external RAM

ETale.1
Associate III

I designed a GUI on stm32f746 discovery board and programmed the board successfully and GUI worked perfectly, now I want to redesign the GUI and my programm to be able to use a custom board which doesn't have an external RAM

at first I disabled the MX_FMC_Init fuction but the display is black and nothing shows up, then I read the article below and followed the instruction but display went black again.

I'm a beginner and I would be very gratefull if anyone guides me how to config the CubeMX and touchgfx to work without external RAM.

https://support.touchgfx.com/docs/development/board-bring-up/how-to/03-display-internal

26 REPLIES 26

here is the code I added:

uint8_t framebuffer[480*272];
HAL_LTDC_SetAddress(&hltdc, (uint32_t*)framebuffer, LTDC_LAYER_1);

I write it as example, you need check generated code and locate where touchgfx and cubemx place buffer creation, some version may differ, when you add your code need remove replace other usw.

You need understand how LTDC work.

the code I mentioned is the code that the touchgfx gave in the instruction,

sorry Im a beginner and I dont undrestand what should I do to to locate and change the buffer location.

Ok then start from info in your docu carefully uint16

main.c

uint16_t framebuffer[480*272]; //16 bpp framebuffer

If your internal RAM is not big enough to hold the array, declare a array corresponding to a smaller resolution, say 480x200.

next text say set 0xC0000000 as addr then do it in ltdc . Your docu not say how setup tuchgfx but i recomm single buffer and address by reference

and enter "(uint32_t*)framebuffer" as reference

and

  1. HAL_LTDC_SetAddress(&hltdc, (uint32_t*)framebuffer, LTDC_LAYER_1);

Then build and reduce 480xyyy to number when RAM isnt over.

ETale.1
Associate III

I did as you instructed the 480*260 framebuffer size was Ok but the display showed nothing, should I do another things in addition to this partial frame buffer?

I did as you instructed the 480*260 framebuffer size was Ok but the display showed nothing, should I do another things in addition to this partial frame buffer?

Not now maybe later you need change ltdc window definition , but showed nothing is bad result. How you create your project?

When you test this on devkit board , good is start with real functional example and then change to internall ram .

Or maybe any memory overflow addressing exist , then you change now 272 to 260 on ltdc_1 and 2 window config and too on touchgfx size automatic change

thanks alot I did all you said, the display shows red color on the regions outside the 400*100 (i changed the size too this value ) part of lcd, but the 400*100 part of lcd is still black and does not show the picture i set in the touchgfx, the picture size is the same as the window ( 400*100), it seems there is a problem with the frame buffer itself i think

For TouchGFX i mean you need change addressing to framebuffer too. Maybe in code still is 0xC000000 when you leave it in ioc touchgfx.

try check source file TouchGFXGeneratedHAL.cpp and check init

void TouchGFXGeneratedHAL::initialize()
{
    HAL::initialize();
 
    registerEventListener(*(touchgfx::Application::getInstance()));
 
    setFrameBufferStartAddresses((void*)0xC0000000, (void*)0, (void*)0);

change 0xC0000000 to your buffer and too

HAL_LTDC_SetAddress(&hltdc, (uint32_t*)framebuffer, LTDC_LAYER_1);

need be call on proper place after mxltdc.