804 views
in System Integration by

Hello,

I am about to purchase a PRO edition of embedded wizard. 

I have set up my custom board correctly and Hello World example is working partially.

 

When i run from atollic studio / STM32CUBEIDE debug mode, the touch handler runs, when programming the Hex directly this does not,

The touch handler does work in both situation where i build the Charts Demo.

 

My problem is the following:

I think i do not have correct functionality of my target specific graphics part because of the following situation:

 

 

 

The lines chart is also corrupt, the dots show correctly, but the dynamic non rectangle parts will fail.

maybe its caused by SDRAM? or any suggestions please, 

when everything works smooth i will be ready to purchase the PRO edition!

 

Thank you in advance!

2 Answers

0 votes
by
Hi there,

nice that you already have adapted Embedded Wizard to your own hardware!

The problem with the not working touch driver could have multiple reasons. My first assumption is a not correctly adapted touch driver. Within EwBspTouchGetEvents() you can see how the integration of a touch driver should look like. Since our latest release we support multi touch, but this sometime makes it necessary to adapt given touch drivers. Did you took into account that it could be necessary to adapt your touch driver as well?

My second assumption is a generally not correctly initialized touch driver. Which touch component do you use and can you ensure that the further needed hardware parts (SPI, GPIO etc.) are correctly initialized?

Another problem could be the code optimization of STM32CubeIDE, could you try to set the optimization to -O0 to ensure that the compiler doesn't removes important code parts. Currently we do not support STM32CubeIDE or even working with this IDE, but maybe it handle the binary in debugging mode a bit different.

The not working touch driver when running the chart demo could be a feedback effect with the pie chart problem, so let's look at that first.

Regarding to that, could you please check the UART console output and post it here?

Best regards,

Tim
by
Edit 1:

Beginner mistake i had still RGB565 of the eval board, instead of RGB888 on the costum board, it did work quite well with the RGB565 Setting.

The Pie and Lines chart are working correct now.

Problem 2:

Big big tearing effect now when using RGB888, i will look into some stm32 presentations of what might cause this.

Info:

i am using eval board based on STM32F756-EvalBoard

 

10:43:07.026> ---------------------------------------------
10:43:17.652> Create UI thread...                          [OK]
10:43:17.652> Initialize Display...                        [OK]
10:43:17.652> Initialize Touch Driver...                   [OK]
10:43:17.652> Initialize Memory Manager...                 [OK]
10:43:17.652> Initialize Graphics Engine...                [OK]
10:43:18.651> Create Embedded Wizard Root Object...        [OK]
10:43:18.651> Create Embedded Wizard Viewport...           [OK]
10:43:18.651> ---------------------------------------------
10:43:18.651> Target system                                STM32F756-Evalboard      
10:43:18.651> Color format                                 RGB888      
10:43:18.651> MemoryPool address                           0xC0119400  
10:43:18.651> MemoryPool size                              6084608 bytes
10:43:18.651> Framebuffer address                          0xC0000000  
10:43:18.651> Doublebuffer address                         0xC06E6C00  
10:43:18.651> Framebuffer size                             800 x 480
10:43:18.651> EwScreeenSize                                800 x 480
10:43:18.651> Graphics accelerator                         DMA2D      
10:43:18.651> Vector graphics support                      enabled      
10:43:18.651> Warp function support                        enabled      
10:43:18.651> Index8 bitmap resource format                enabled      
10:43:18.651> RGB565 bitmap resource format                enabled      
10:43:18.651> Bidirectional text support                   enabled      
10:43:18.651> Operating system                             FreeRTOS      
10:43:18.651> External flash device                        QSPI Flash      
10:43:18.651> Linker section for bitmap pixel data         .SectionEwResource      
10:43:18.651> Linker section for font pixel data           .SectionEwResource      
10:43:18.651> Toolchain                                    GCC      
10:43:18.651> C-Compiler version                           7.3.1      
10:43:18.651> Build date and time                          Aug 17 2020, 10:35:12  
10:43:18.651> Runtime Environment (RTE) version            9.30
10:43:18.651> Graphics Engine (GFX) version                9.30
10:43:18.651> Max surface cache size                       4194304 bytes
10:43:18.651> Glyph cache size                             256 x 256
10:43:18.651> Max issue tasks                              100      
10:43:18.651> Surface rotation                             0      
10:43:18.651> ---------------------------------------------
by
Touch handler now working, after reading the datasheet, says 200mS power up delay, when debugging its already powered up, when not, it goes to fast!

Solved
0 votes
by
Hello,

in order to provide you helpful advices, please let us know more details about your target / your custom hardware and the system configuration (ewconfig.h) that you are using.

Are you using an external QSPI flash? Maybe the external flash loader is not working properly - or sometimes a full erase before flashing might help.

Please try first to run the simple examples (like HelloWorld or ScreenOrientation) without any issues, before launching the complex applications like ChartsDemo.

Best regards,

Manfred.
by
Edit 1:

Beginner mistake i had still RGB565 of the eval board, instead of RGB888 on the costum board, it did work quite well with the RGB565 Setting.

The Pie and Lines chart are working correct now.

Problem 2:

Big big tearing effect now when using RGB888, i will look into some stm32 presentations of what might cause this.

Info:

i am using eval board based on STM32F756-EvalBoard

 

10:43:07.026> ---------------------------------------------
10:43:17.652> Create UI thread...                          [OK]
10:43:17.652> Initialize Display...                        [OK]
10:43:17.652> Initialize Touch Driver...                   [OK]
10:43:17.652> Initialize Memory Manager...                 [OK]
10:43:17.652> Initialize Graphics Engine...                [OK]
10:43:18.651> Create Embedded Wizard Root Object...        [OK]
10:43:18.651> Create Embedded Wizard Viewport...           [OK]
10:43:18.651> ---------------------------------------------
10:43:18.651> Target system                                STM32F756-Evalboard      
10:43:18.651> Color format                                 RGB888      
10:43:18.651> MemoryPool address                           0xC0119400  
10:43:18.651> MemoryPool size                              6084608 bytes
10:43:18.651> Framebuffer address                          0xC0000000  
10:43:18.651> Doublebuffer address                         0xC06E6C00  
10:43:18.651> Framebuffer size                             800 x 480
10:43:18.651> EwScreeenSize                                800 x 480
10:43:18.651> Graphics accelerator                         DMA2D      
10:43:18.651> Vector graphics support                      enabled      
10:43:18.651> Warp function support                        enabled      
10:43:18.651> Index8 bitmap resource format                enabled      
10:43:18.651> RGB565 bitmap resource format                enabled      
10:43:18.651> Bidirectional text support                   enabled      
10:43:18.651> Operating system                             FreeRTOS      
10:43:18.651> External flash device                        QSPI Flash      
10:43:18.651> Linker section for bitmap pixel data         .SectionEwResource      
10:43:18.651> Linker section for font pixel data           .SectionEwResource      
10:43:18.651> Toolchain                                    GCC      
10:43:18.651> C-Compiler version                           7.3.1      
10:43:18.651> Build date and time                          Aug 17 2020, 10:35:12  
10:43:18.651> Runtime Environment (RTE) version            9.30
10:43:18.651> Graphics Engine (GFX) version                9.30
10:43:18.651> Max surface cache size                       4194304 bytes
10:43:18.651> Glyph cache size                             256 x 256
10:43:18.651> Max issue tasks                              100      
10:43:18.651> Surface rotation                             0      
10:43:18.651> ---------------------------------------------
by

looking at some other screen tearing question on this website:
https://ask.embedded-wizard.de/4660/flickering-while-using-doublebuffering?show=4663#c4663

 

i get 43 frames but no tearing, if i make this 60 frames it will solve the tearing problem? 

How do i make this 60 frames..?

 

Tearing only happens when glyps or dynamic elements are changing, after touch events

Also when i am using the screenOrientation example, the bouncing balls will cause tearing, and 

very noticable that the tearing have red and green colors, maybe i need to make seperate layers for these?

by
Edit 2:

Got some progress with the screen tearing now gone at 25 FPS, the board is routed optimal  for 10MHz instead of 33Mhz,, when going to 60FPS doesnt work, dont know if the data lines are also matched or not.

 

Problem 3:
screen filkkering and horizontal line is noisy
by
Concerning the screen flickering - maybe it is a memory bandwidth issue.

Can you try to use RGB565 instead of RGB888? This should help...

Best regards,

Manfred
by
Dear Manfred,

I will try this suggestion. Although my original problem was directly related to using RGB565 instead of RGB888.

I  have little experience with LCD and this costum board. I am trying to port a board which has running stEmWin, and i think this is also using RGB565.

The TFT screen has parallel bus of 24 bit 8xR 8xG and 8xB. so i am not certain how this can support RGB565.

I tried to add a bigger capacitor to the backlight, thinking the flikker was coming from there (ripple or crosstalk), but that did not help, so it must be the memory bandwidth then.

 

Edit:

it did not help. original problem is back, and still flikkering screen.
by

Dear Manfred,

 

The custom board i am working with originated from an STM32-F756-EVAL, it has adapted to go from 640x480 screen to 800x480 screen.

Is there a way of instead decreasing memory bus load, to increase memory bus bandwidth? different STM32 MCU?

currently using STM32F767BI

 

 

Edit:

i see the my SDRAM size is set to 8MB, instead of 256MB. 256MB is not working, maybe this can help this issue, how can i get the 256MB size working? the chip is the same as on the EVAL board, which is 256MB.

i am trying your suggestion on https://ask.embedded-wizard.de/2474/sdram-memory-test

 

the program crash at attempt of 64MB, 32MB works. but not 256MB. it does not give 'Error at Adress' but goes into 'HardFault_Handler'.

 

Edit 2:

i think maybe the screen flikker could be related also to the 25FPS, that is low enough to be able to see changes in the LCD maybe?

Yes. at 60FPS there is screen tearing on movement, but no flikkering.

by

Hi,

concerning the flickering/tearing effects, let me refer to this question/answer - there you will find a simple test application that is useful to detect flickering/tearing effects. Let me know the results. 

Of course, you can use a framebuffer with color format RGB565 and a display that is connected with 6 or 8 bits per color channel (= 18 bits or 24 bits RGB). The LTDC of the STM32 hardware is able to convert the color accordingly.

Concerning the memory test: Please make sure that the MPU settings are adapted to match the start address and size of your SDRAM.

Btw: Is your SDRAM connected with 16bit or with 32 bit? This has a big impact to the available memory bandwidth.

Best regards,

Manfred.

Embedded Wizard Website | Privacy Policy | Imprint

...