2020-11-18 02:24 AM
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
2020-11-22 03:05 AM
O now I get what you meant,
I made these changes you mentioned in touchGFXGeneratedHAL.cpp file, but the output is the same :(
extern uint16_t framebuffer[400*100*3];
void TouchGFXGeneratedHAL::initialize()
{
HAL::initialize();
registerEventListener(*(Application::getInstance()));
registerTaskDelayFunction(&OSWrappers::taskDelay);
setFrameRefreshStrategy(HAL::REFRESH_STRATEGY_OPTIM_SINGLE_BUFFER_TFT_CTRL);
setFrameBufferStartAddresses((void*)framebuffer, (void*)0, (void*)0);
2020-11-22 08:37 AM
How you build your project? Because when in TouchGFX, then generated files is overwrited on each build. Your changes is removed.
I recommend use IDE . and you dont write where yuo place line in main?
HAL_LTDC_SetAddress(&hltdc, (uint32_t*)framebuffer, LTDC_LAYER_1);
As simple test add memset(framebuffer,55,4800); //this make some gray part on screen when buffer works.
Too i recomm use debuger and check if your code work and not halt in an hardfault...
Why 400*100*3 ?
2021-05-24 02:56 PM
Hi @ETale.1
May be it is now too late to post an answer
I was also looking to use Touchgfx without external RAM as my application has very minimal graphics. This post helped me a lot to poke at the right places
Here is what I did
void TouchGFXHAL::initialize()
{
// Calling parent implementation of initialize().
//
// To overwrite the generated implementation, omit call to parent function
// and implemented needed functionality here.
// Please note, HAL::initialize() must be called to initialize the framework.
TouchGFXGeneratedHAL::initialize();
// Commented out
// setFrameBufferStartAddresses((void*)0xC0000000, (void*)0xC003FC00, (void*)0xC007F800); //enable the animation storage to allow slide animations
// lockDMAToFrontPorch(false);
instrumentation.init();
setMCUInstrumentation(&instrumentation);
enableMCULoadCalculation(true);
}
MEMORY
{
RAM (xrw) : ORIGIN = 0x20000000, LENGTH = 64K
// frame buffer is 255k long in my case
RAM_FRAME_BUFFER (xrw) : ORIGIN = 0x20001000, LENGTH = 256K
FLASH (rx) : ORIGIN = 0x8000000, LENGTH = 1024K
}
// add at the end
/*Added for frame buffer */
.TouchGFX_Framebuffer : {
__TouchGFX_Framebuffer_start = .;
KEEP(*(.TouchGFX_Framebuffer))
__TouchGFX_Framebuffer_end = .;
} > RAM_FRAME_BUFFER
Thanks,
Vimal
2021-05-24 09:51 PM
I am interested as well to know this. Would choosing partial framebuffer help in this case?
2021-05-24 11:32 PM
Hi,
Could you maybe add in the "Idea zone" of this forum the demand of improvement of this article ? It makes sense to put a reminder that due to the hierarchy of the code the generated files can be overwritten by the user in the relevant files.
/Romain
2021-05-25 07:13 AM
Partial is usable only when LCD have own memory framebuffer. And too partial cant use acceleration. And one example of custom 1280x480 LTDC layer 0 image in flash, 1024x320 layer 1 320kB (internal ram) TouchGFX framebuffer with alpha 150.
2021-11-28 11:19 PM
hi ETale.1
are you got any solution
i am also stuck in same problem