Skip to main content
cs_it
Associate II
July 22, 2015
Question

Missing event WM_NOTIFICATION_RELEASED for STemWin button

  • July 22, 2015
  • 2 replies
  • 846 views
Posted on July 22, 2015 at 08:15

STM32F429I-Discovery demonstation application compiled with GCC sometimes hangs on release of a STemWin button.

It is due to a bug in k_bsp.c code in function k_TouchUpdate() which sends wrong coordinates when users lift pen from touch panel.

I manage to fix the problem with the following modifications in line 118:

Replace:

   

if((ts.X != 0) &&  (ts.Y != 0))

with:

   

if((ts.X != 0) &&  (ts.Y != 0)

       && ts.TouchDetected != 0) /* 08/07/2015: Fix WM_NOTIFICATION_RELEASED event missing */

Hope this can help!

    This topic has been closed for replies.

    2 replies

    Nesrine M_O
    Associate
    July 23, 2015
    Posted on July 23, 2015 at 17:11

    Hi,

    I cannot reproduce your issue, can you please tell me exactly where you are facing it?

    -Syrine-

    cs_it
    cs_itAuthor
    Associate II
    July 28, 2015
    Posted on July 28, 2015 at 23:21

    Hi,

    I compiled the demonstration program found is STM32CubeF4 firmware release 1.6.0, for STM32F429I-Discovery board, with GCC version 4.7.3

    The demo runs fine except for one problem : when I click on a dialog button (for example in the Reversi game), the demo sometime freezes. This never happens with the

    binary provided with the firmware (STM32CubeDemo_STM32F429I-Discovery_1.2.1.hex).

    I found the source of this issue: when the stylus goes up from the touchscreen, wrong coordinates are returned to STemWin, causing the event WM_NOTIFICATION_RELEASED never be sent to the dialog window proc.

    The fix I propose ensure that the coordinates sent to stEmWin are correct when the stylus goes up. allowing the WM_NOTIFICATION_RELEASED to be generated normally.

    Christian Schoffit