Jump to content

Touch screen issue


Ivan.L

Recommended Posts

Hello!

I'm pretty new to the ugfx and the microcontroller world in general. I created a project in keil using the wiki guide and copied the gui files from the widgets demo. The only difference is that I'm trying to run barebones/raw32. The gui is showing up perfectly but it doesn't respond to touches 

My understanding of the problem is that the touch screen is not getting polled. 

Could the issue be in the pe = geventEventWait(&gl, 0); line of gui.c? Changing the 0 into TIME_INFINITE results in a hard fault.

Or did I mess up with the initialization and project setup? It refused to even boot without including stm32f746g_raw32_interrupts.c or me implementing the SysTick_Handler function.

 

gfxconf.h

gui.c

main.c

Link to comment
Share on other sites

As it is a raw32 platform please start with the threads demo as getting threading working with raw32 can be tricky as it is very subject to bugs in the c runtime library (and keil is one of those known to have a buggy c library).

In your case I think the solution will be to correctly set the GFX_CPU configuration option. Using that option avoids the bug prone areas of the c library.

 

Link to comment
Share on other sites

Hello @Ivan.L and welcome to the µGFX community!

For clarification: The GINPUT module relies on a GTIMER which in turn requires threading to work which is provided by the RAW32 GOS port. As @inmarket mentioned there's a very well known bug regarding the c library implementation of setjmp() and longjmp() which are used when GFX_CPU is set to GFX_CPU_UNKNOWN. However, in the configuration file that you showed in your first post you set it correctly to GFX_CPU_CORTEX_M7_FP so I don't expect there to be a problem. However, running the /demos/modules/gos/threads demo as mentioned by @inmarket is definitely worth a try to further track down the problem. The demo lets you verify whether the threading stuff is actually working.

The timeout parameter of geventEventWait() should not have any effect in that case. The hardfault that you're mentioning again suggests that it could be a problem in the threading.

There has been a similar issue reported by @91321146 but unfortunately we didn't have time yet to investigate ourselves. We have RAW32 working on the STM32F7 Discovery board using Keil µVision but maybe something else is buggy.
We're looking forward for your report regarding the /demos/modules/gos/thread demo.

Link to comment
Share on other sites

Thank you for all the help!

The issue was the incorrect setting of GFX_CPU and not setting GFX_COMPILER at all. Defining it to GFX_COMPILER_KEIL did the job.

This was all found using the handy thread demo. 

Then I had to change the timeout parameter of geventEventWait() to 10.

Now everything works fine.

Link to comment
Share on other sites

The compiler should have been autodetected. The cpu needs to be manually set but not the compiler.

Can you please try not defining the compiler, setting GFX_SHOW_COMPILER (I think that is what it is, see gfxconf.example) and then tell us what compiler it reports when you compile. If you can also give us the details and version number of your compiler we will try and fix it so it detects your compiler correctly.

 

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...