242 views
in Platform Packages by

Hello,

I am using EW 12.04 pro edition with STM32.Neochrome platform package for STM32U599 MCU, we are working with FREERTOS.
Currently we do not have the graphics accelerator enabled(yet to integrate NemaGFX library) but we do have double framebuffer active.

We recently integrated the touch driver interface, and feeding the various touch events like up, down & move/hold events to the GUI App from here:
 

      /* get data out of the touch event */
      finger     = 0;//aTouchEvent[ touch ].Finger;
      touchPos.X = aTouchEvent[ touch ].XPos;
      touchPos.Y = aTouchEvent[ touch ].YPos;

      /* begin of touch cycle */
      if ( aTouchEvent[ touch ].State == EW_BSP_TOUCH_DOWN )
        touchEvent |= CoreRoot__DriveMultiTouchHitting(  RootObject, 1, finger, touchPos );

      /* movement during touch cycle */
      else if ( aTouchEvent[ touch ].State == EW_BSP_TOUCH_MOVE )
        touchEvent |= CoreRoot__DriveMultiTouchMovement( RootObject, finger, touchPos );

      /* end of touch cycle */
      else if ( aTouchEvent[ touch ].State == EW_BSP_TOUCH_UP )
        touchEvent |= CoreRoot__DriveMultiTouchHitting(  RootObject, 0, finger, touchPos );

 

Our project requirement for touch is single input or single finger touch actions.
The touch actions like simple tap, press & hold, drag, etc. work fine, but for sliding operations we are facing EW Panic situation a few times.  The hold or move events are feed to the app only at time interval of 100ms to reduce the number of raw touch events coming from the touch driver.

Throttling down the number of move/hold events also did not work and we face the display freeze due to EwPanic() sometimes when we try to continuous swipe up & down.

We are using SlideTouchHandler as below and connected it to the Outline's SlideHandler property.

 

 

I tried to debug it in the IAR workbench and have the call stack as below:




I am not sure why updateLock does not remain 0, since its being updated only in CoreRoot_UpdateCanvas() function and its expected to increment and decrement in same function, there is no other place in our code where it could be changed.

 

One important thing is that we are processing the touch events separately and not through EwProcess(), but we are making sure to let EwProcess() know if there are any updates on events so it knows to call the EwUpdate() API.

I am curious to know why does no such issue observed in drag or hold but only in slide up down operations.
Let us know if you have any idea about the issue or any further details you need to understand the problem.

 

Thanks,

Vikas

1 Answer

0 votes
by

Hi Vikas,

One important thing is that we are processing the touch events separately and not through EwProcess(), but we are making sure to let EwProcess() know if there are any updates on events so it knows to call the EwUpdate() API.

Does this mean, that you are providing the touch events from a separate FreeRTOS task? This means, do you call CoreRoot__DriveMultiTouchHitting() and CoreRoot__DriveMultiTouchMovement() from a separate task?

Best regards,

Manfred.

by
Hi Manfred,

Thanks for your quick note on the issue.

We have provided a callback function from EW library to another FREERTOS task to let us know the touch detection and this callback function is processing the touch event and later calling the CoreRoot__DriveMultiTouchHitting() and CoreRoot__DriveMultiTouchMovement(). So, the touch events are not received through message communication to display task, I think you might be guessing right that the CoreRoot__DriveMultiTouchHitting() and CoreRoot__DriveMultiTouchMovement() are being called from touch task.

Also, meanwhile EwProcess() is running every 100ms simultaneously.

I might have to look into it more to confirm if that's the case and to see if we are really executing all EW stuff in same display task.
by
Please be aware that every Embedded Wizard GUI application requires the execution in a single GUI task!

If you are working with an operating system and your software is using several threads/tasks, please take care to access your GUI application only within the context of your GUI thread/task.

Embedded Wizard Website | Privacy Policy | Imprint

...