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-18 03:32 AM
Hi,
Could you maybe share your CubeMX project or screenshots of your configuration (unless confidential)?
First just to check, you put the framebuffer in internal RAM but do you have enough RAM for it ? A framebuffer size is Height * Width * bpp. Depending on your configuration you might be using 2 framebuffers + annimation storage (so in total for that example, it is 3 framebuufers). And be careful as you also need some storage for the TouchGFX framezork and memory for the "heaviest" screen of your GUI.
The number of framebuffer you wish to use can be modified in CubeMX in the X-CUBE-TouchGFX configuraqtion in the framebuffer strategy config.If you already all this then sorry :grinning_face_with_sweat:.
What you can do as well is look at the H7B3 disco board. If i am not mistaken it also does not use external RAM, so have a look at its application template and CubeMX config.
/Romain
2020-11-18 04:36 AM
Hi,
first of all than you for your response.
the .ioc cubeMX file is attached,
Im using f7 discovery witch uses 480*272 LCD so I need 480*272*16bit/8 = 261120 bytes space and stm32f746NG has got 320kbytes of internal RAM space, configuration is set on 1 framebuffer and the test gui is a simple background so i thaught it wont cause any problem to use this method but all i get is a black screen.
I'm e beginner maybe Im mistaken in storage calculation and I'm not considering something.
the cubeMx configuration screenshots are:
2020-11-18 06:31 AM
Out of curiosity, why do you put the start address at 0xC0000000 in the last screenshot? When I opened the ioc project you shared, it automatically sets it to 0x20020000. The configuration overall seems ok at first glance, I compared it to the F746G disco AT and the H7b3 disco AT we provide in Designer. The only thing that surprises me yeah is that you set the color frame buffer start address at 0x20010000 and then the start address for the "touchgfx" framebuffer at 0xc0000000
Could you test it real quick if that makes sense?
2020-11-18 06:34 AM
In a normal STM32F746G disco board it is the SDRAM configured in FMC that is mapped at 0xC000000 . Are you using a custom hardware or you just modified the generated AT for the F746G disco?
2020-11-18 06:55 AM
I'm also not 100% sure that those 320kbytes of internal RAM are really accessible, maybe only a portion of it is
2020-11-21 12:11 AM
sorry I gave you the old one, in the last configuration I set the address to 0x20000000 but the compiler said that framebuffer there is about 7016 bytes out of range, then i checked the documentation of the mcu and found out somthing about 250 kbytes of internal RAM is accessible so I think theres no way I can procced this way, the only thing that surprises me is the thing I read in touchgfx webpage witch said that it is possible to run a 480x272 TFT with internal RAM of this MCU
Errors:
STM32F746G_DISCO.elf section `.bss' will not fit in region `RAM'
region `RAM' overflowed by 7016 bytes
Link:
https://www.touchgfx.com/news/high-quality-graphics-using-only-internal-memory/
2020-11-21 12:11 AM
* 0x20020000
2020-11-21 03:10 AM
For internal ram you cannot use direct address for framebuffer (maybe yes but then you need edit linker scripts...). Compiler need manage RAM and too framebuffer.
Then you need in code create array for it and use his pointer in config.
example
uint8_t framebuffer[480x272*2];
then change in ioc By Address to other settings...
And yes you need continuos RAM then here you is over limit , but still exist way to use some workarounds, as first you can dont use full screen and make some border on display, that reduce RAM needed. Example 400x200
Second way is use CLUT , but this isnt supported in TouchGFX, then you need make GUI...
Third as you say is use other framebuffer type, with one byte per pixel, Touch GFX support many options for it ... need manual config
2020-11-21 03:27 AM
thanks for your response but I tried this method earlier based on the instruction given in this link : https://support.touchgfx.com/docs/development/board-bring-up/how-to/03-display-internal\
the same as you said but It is not working too, this time the compiler says: "region `RAM' overflowed by 268136 bytes"