cancel
Showing results for 
Search instead for 
Did you mean: 

Display remains black when using FMC and internal memory

JRoyn.1
Associate II

Hello,

I am struggling with getting a display connected to FMC bus up and running.

The problem is that the display remains black all the time.

I have followed the TouchGFX documentation, and implemented code according to TouchGFX AL Development. I used the scenario "FMC and SPI display Interface" and implemented the code described in that chapter.

I use STM32CubeMx for setup the hardware and generate code (for IAR EWB). Then TouchGFX Designer for generating graphics. Then remade code in STM32CubeMx, and then using IAR EWB to implement the rest. I have enabled FreeRTOS in STM32CubeMx, and the MX_TouchGFX_Process() is running in a task.

I have made setup code for the display (Winstar 2.4" 320x240 with ILI9341 driver). The setup code is tested, and I can send and recieve data to/from display.

Vsync (FMARK) is working and updating semaphore for touchgfx vsync (OSWrappers::signalVSync();).

I can see that tick() for touchGFX is updating constantly.

But display is constantly black.

I have made a simple screen in TouchGFX designer, simply showing an image. When I run the simulator in TouchGFX designer, it behaves as expected.

If I look into the touchGFX framebuffer, the entire buffer is 0, so it looks like it is never updated. 

If I place a break point in TouchGFXHAL::flushFrameBuffer(), and then fill the framebuffer with e.g 0xf000 (blue), and then run the transfer code in TouchGFXHAL::flushFrameBuffer(), the display turns into blue. So from there is works. Filling of framebuffer seems to be done in the TouchGFX library, so there I can't debug.

Versions I have used:

STM32CubeMx: 6.3.0

TouchGFX Designer: 4.17.0

IAR EWB: 8.50.9

I am using STM32H7B3I-EVAL that we have made an adapterboard for with the display.

I am only using STM32H7's internal memory (both code and framebuffer data)

Any idea what is wrong?

Regards, Jan

1 ACCEPTED SOLUTION

Accepted Solutions
JRoyn.1
Associate II

Answering myself here,

This was unfortunately bug in by code.

I am using double framebuffer strategy, and in TouchGFXHAL::flushFrameBuffer() I had used getTFTFrameBuffer() instead of getClientFrameBuffer().

Then I always got the pointer to the start of framebuffer1 instead of pointer to the current buffer.

Using getClientFrameBuffer() fixed the problem, and I have picture on the screen.

Regards, Jan

View solution in original post

2 REPLIES 2
JRoyn.1
Associate II

Answering myself here,

This was unfortunately bug in by code.

I am using double framebuffer strategy, and in TouchGFXHAL::flushFrameBuffer() I had used getTFTFrameBuffer() instead of getClientFrameBuffer().

Then I always got the pointer to the start of framebuffer1 instead of pointer to the current buffer.

Using getClientFrameBuffer() fixed the problem, and I have picture on the screen.

Regards, Jan

Alexandre RENOUX
Principal

Hello JRoyn.1,

Happy to see you found a solution :)

/Alexandre