cancel
Showing results for 
Search instead for 
Did you mean: 

How to debug Touchgfx for custom Boards?

Harwinder Singh
Associate II

Hello everyone ,

I am new to touchgfx. I have a custom board with STM32f769II controller ,SDRAM with 16bit data bus from Micron,QSPI flash and with 7inch TFT display (RGB888). I firstly try to configure only LTDC to display a image on LCD from flash i got success so means i am able to configure LTDC rightly. Then i try to iniatlize SDARM i just give LTDC frame start address as 0xc0000000(sdram starting address) and copy the image data from flash to SDRAM. It works fine for me. Means LTDC and SDRAM are intilized ok. So then i moved toward TouchGFX . I create a project using stmcubeIDE initialize touchgfx and generate code but its not working for me. I also have 32f746Disco board in same way i initialize the board using CUBE IDE but it works fine. Then i try to Compare both codes(Because both have stm32f7,same SDRAM & Same QSPI) but could not found any diff. But on custom board its not working. So please let me know how to debug where is my mistake?

Is there is any way suppose we set layer setting to 10x10 pixel in LTDC and same in touchgfx then draw a box with red colour only ,& In debug we can see SDRAM contents or frame buffer contents that LTDC is going to put on display?

6 REPLIES 6
Martin KJELDSEN
Chief III

Just to get things straight. You've written code to setup sdram and LTDC, you then created a new project in cubeide and copied your board bringup code to this new project, right?

You can reconfigure the LTDC to something like 10x10 and use that with touchgfx (you'll get a 10x10 canvas in the designer). That's actually something like we're doing here. Do board bringup, add TouchGFX, Render something with TouchGFX, check the framebuffer, check display (sometimes colors are not right).

Harwinder Singh
Associate II

Hi Martin,

Just to get things straight. You've written code to setup sdram and LTDC, you then created a new project in cubeide and copied your board bringup code to this new project, right?

Yes you are right.

i have done some experiments on 746Disco board. I have configure the LTDC as shown below.0690X00000BwZZLQA3.png

In TOuch graphics i got 20x20 canvas in designer. Then i just plcae a RED colour box i this of dimensions 20x20.

0690X00000BwZZQQA3.pngThen after build project then go to debug in cube iDE it works fine on board a red box is displayed on screen of 746Disco. Then in debug when i check the frambuffer contents these are as shown below.

0690X00000BwZZVQA3.png i have a question now.

it is showing 0x00F800F8 means for one pixels in RGB565 it is 0x00F8. According to me it should be 0xF800 for RGB565. so please clear this one .

For now i am not able do same thing on my custom board. on my custom board i am getting 0x0000 in frame buffer. So means touchgfx is not able to put the content in frame buffer. so what are the possible reasons?

Thanks

Correct, 0xF800 is Red in RGB565. (Or 0x00F8 because of endianness)

And what is your custom board exactly? You could start by checking if you're even entering your view and executing screen definition code. Next, check that the memory is addressable. Can you write something there manually?

Basically, check what your application is doing when you run it. Are you executing the code to render your box? etc

/Martin

Harwinder Singh
Associate II

I have attached my code . i am not able to find any bug everything is going same as that happens in 746_disco .Code is entering into view files but unable to display any thing, only garbage i displayed on screen. Also Frame buffer is showing garbage values. So please check my code ones if you have some spare time. if you need schematics please let me know.

code Link https://drive.google.com/file/d/17HdGOVFDbzC0_i1sh9uL-BXP0CvV2so5/view?usp=sharing

Thanks

Harwinder Singh
Associate II

Hi Martin,

Finally issue is resolved, the issue was not with touchgfx it was of FreeRTOS. Actually i am not configuring much heap for RTOS . So that why touchgfx not able to run. But it is no where mention that we have to set minimum heap size to 32768 to use touchgfx. Any way now i am able to display widgets using touchgfx.

Now i have a new issue😊 . I am getting some moving pixels on screen this is because of DMA2D. So can i use touchgfx without DMA2D? if yes, then how? if Not then how to verify that DMA2D is properly configured?

Thanks

That seems extreme - Are you talking bytes (FreeRTOSConfig.h). We run applications with far less.

e.g.

#define configTOTAL_HEAP_SIZE                   ( ( size_t ) ( 5500 ) )

Yes, you can use TouchGFX without. Just use the NoDMA class instead of STM32DMA.

#include <touchgfx/hal/NoDMA.hpp>