cancel
Showing results for 
Search instead for 
Did you mean: 

Has anybody tried to port a high resolution 4.3" 800x480 lcd to TouchGFX?

hansd56
Senior II

 I am using a STM32F746IGT. I have tested the memory and lcd interface with some other library. I am getting hard faults with TouchGFX and since some of the code is in libraries it makes it difficult to debug. Properly a timing issue? Any ideas?

4 REPLIES 4
Martin KJELDSEN
Chief III

Hi @hansd56​,

Do you know roughly what your application was doing when the hardfault occurs? Are you still in the initialization phase or do you have a screen displaying on the LCD?

/Martin

hansd56
Senior II

Hi Martin, we are keeping you busy. Thanks for your reply. I am using STM32CubeIDE and J-Link EDU and debug with SWV enabled. The hardware is from Waveshare Open7XXI-C with 4.3inch Capacitive Touch LCD, 800x480. Touchscreen is still disabled. I have also made sure there are no interrupts enabled other than the system tick generated by timer 6.

The crash happens after the highlighted text.

void OSWrappers::waitForVSync()

{

   // First make sure the queue is empty, by trying to remove an element with 0 timeout.

   xQueueReceive(vsync_q, &dummy, 0);

   // Then, wait for next VSYNC to occur.

   xQueueReceive(vsync_q, &dummy, portMAX_DELAY);

}

I think I will give up on TouchGFX for now until a new version of STM32CubeIDE comes out. The actual Atollic part seems to be ok. Just getting a bit tired of having to disable the same code from compilation every time I make change in CubeMX. I have attached a picture for you to see the assembly where the crash happens.

Martin KJELDSEN
Chief III

Haha, yes you are. I enjoy it :)

It makes me sad that you're giving up on Touchgfx. But i understand that it can be a pain when you have to work extra hard to make supporting tools work. Do you want me to try and give you a method to circumvent this unfurtunate behavior (it's actually CubeMX that generates the project) - We'll just use git to revert whate CubeIDE/CubeMX overwrites (project settings).

Are you getting your VSYNCs? Check your concrete HAL class and break in the LCD interrupt handler. I wasn't clear on what kind of faults you're getting.

Don't give up!

/Martin

hansd56
Senior II

Hi Martin, I am not giving up, just waiting for the next release. I know CubeMX is causing most of the problems but also the porting section of the TouchGFX documentation is for my taste not detailed enough.

I set a break point at xQueueReceive(vsync_q, &dummy, portMAX_DELAY); and then single step trough the assembly code until it crashes. It returns to the

taskentryEV and crashes at the highlighted instructions. In the SVW window you can see it is a Hard Fault. I guess it tries to render to the screen and the SVW reports Obviously something in the background could overwrite some internal memory locations? At the same time there is FreeRTOS running. It gets rather complex quickly. I will have another go when I have a spare moment.