S5D9 Touch event not added.

I am debugging why nothing is shown on the display.  When I write directly to Frame Buffer it is shown. 

window1 is not shown. following PE_HMIguix Hello world example

please clarify below code from main_thread_entry()

   // Create the widgets we have defined with the GUIX data structures and resources.
    GX_CONST GX_STUDIO_WIDGET ** pp_studio_widget = &smart7_widget_table[0];
    GX_WIDGET * p_first_screen = NULL;

    while (GX_NULL != *pp_studio_widget)
    {
        // We must first create the widgets according the data generated in GUIX Studio.

        // Once we are working on the widget we want to see first, save the pointer for later.
        if (0 == strcmp("window1", (char*)(*pp_studio_widget)->widget_name))
        {
            gx_studio_named_widget_create((*pp_studio_widget)->widget_name, (GX_WIDGET *)p_window_root, GX_NULL);
        } else {
            gx_studio_named_widget_create((*pp_studio_widget)->widget_name, GX_NULL, GX_NULL);
        }
        // Move to next top-level widget
        pp_studio_widget++;
    }

    // Attach the first screen to the root so we can see it when the root is shown
   status = gx_widget_attach(p_window_root, p_first_screen);


    if(TX_SUCCESS != status)
    {
        error_trap(err,"gx_widget_attach");
    }

    /* Shows the root window to make it and patients screen visible. */
    status = gx_widget_show(p_window_root);
    if(TX_SUCCESS != status)
    {
        error_trap(err,"gx_widget_show");
    }

    /* Lets GUIX run. */
    status = gx_system_start();
    if(TX_SUCCESS != status)
    {
        error_trap(err,"gx_system_start");
    }

It should have been status = gx_widget_attach(p_window_root, p_first_screen);

I have corrected in my code. It is giving error of status = 7   TX_NO_EVENTS

When I generated code for custom board,  Touch Event is not created in configuration.

How to manually add this event ? 

I tried again with ft5x06 driver. still Touch event is not created in configuration. 

If I manually copy paste the code in DisplayThread.c it is being erased while compiling.

  • Hi path,

    Yes, manually changing DisplayThread.c will not yield any changes as it will be automatically overwritten by the settings you have when generating the code.  That being said, there is a bit involved here and I'm trying to figure out the best spot to look into this.  The thing that is sticking out to me is that you're asking how to manually add the event but you haven't explained what happens when you click on the "New Event..." button from figure 50.  Is that button not available in the IDE, is it not creating an event within the IDE, or is it being created in the IDE but then not being created when you compile the program?

    Let me know so I, or someone else familiar with the Synergy platform, can better help you.  Thanks!

    -Josh

    If this response, or one provided by another user, answers your question, please verify the answer. Thank you!
    Renesas Engineering Community Moderators
    https://community.renesas.com/
    https://academy.renesas.com/
    https://en-support.renesas.com/knowledgeBase

  • I followed r12an0030eu0121-synergy-pe-hmi1-guix-hello-world.pdf

    as per that event should be added when sf_touch_panel_i2c is added in threads menu. but not happened in my project.

    I am able to manually add an event. but it is not generated any code. as given below in Main_Thread.c of PE HMI

    void main_thread_create(void)
    {
        /* Increment count so we will know the number of ISDE created threads. */
        g_ssp_common_thread_count++;
    
        /* Initialize each kernel object. */
        UINT err_g_touch_event_flags;
        err_g_touch_event_flags = tx_event_flags_create (&g_touch_event_flags, (CHAR*) "New Event Flags");
        if (TX_SUCCESS != err_g_touch_event_flags)
        {
            tx_startup_err_callback (&g_touch_event_flags, 0);
        }
        UINT err_g_main_semaphore_lcdc;
        err_g_main_semaphore_lcdc = tx_semaphore_create (&g_main_semaphore_lcdc, (CHAR*) "New Semaphore", 0);
        if (TX_SUCCESS != err_g_main_semaphore_lcdc)
        {
            tx_startup_err_callback (&g_main_semaphore_lcdc, 0);
        }
    
        UINT err;
        err = tx_thread_create (&main_thread, (CHAR*) "Main Thread", main_thread_func, (ULONG) NULL, &main_thread_stack,
                                2048, 6, 6, 10, TX_AUTO_START);
        if (TX_SUCCESS != err)
        {
            tx_startup_err_callback (&main_thread, 0);
        }
    }

    in my project what I got in Display_Thread.c is the below code.

    void DisplayThread_create(void)
    {
        /* Increment count so we will know the number of ISDE created threads. */
        g_ssp_common_thread_count++;
    
        /* Initialize each kernel object. */
    
        UINT err;
        err = tx_thread_create (&DisplayThread, (CHAR*) "Display Thread", DisplayThread_func, (ULONG) NULL,
                                &DisplayThread_stack, 4096, 6, 6, 10, TX_AUTO_START);
        if (TX_SUCCESS != err)
        {
            tx_startup_err_callback (&DisplayThread, 0);
        }
    }

    while debugging I am getting below error 

    status = gx_widget_attach(p_window_root, p_first_screen);

    It is giving error of status = 7     TX_NO_EVENTS

    What events it is missing ? 

    I wanted to know what event to be added and how to configure it. I tried the below

    and then added messaging framework

    I got this

    but Display_Thread.c did not have the code as in Main_Thread.c of PE HMI mentioned above.

    but PE HMI does not have the configuration as mentioned in r12an0030eu0121-synergy-pe-hmi1-guix-hello-world.pdf

    PE_HMI Main_thread.c does have the event code as seen above code. 

    I wanted to know what I am missing here. 

  • Hi Path,

    My thought is that perhaps you missed something in the process of creating your board in the SSP.  As you're referring to the S5D9 and not an evaluation board of some sort, I'm assuming you're running this on a custom board.  Have you reviewed your process of creating the project itself to make sure that the software properly correlates with the hardware you're using?

    -Josh

    If this response, or one provided by another user, answers your question, please verify the answer. Thank you!
    Renesas Engineering Community Moderators
    https://community.renesas.com/
    https://academy.renesas.com/
    https://en-support.renesas.com/knowledgeBase

  • Hi

    It is Custom Board with S5D9 and SDRAM. followed below document for creating Custom BSP.

    https://synergygallery.renesas.com/media/products/22/291/en-US/r01an3044eu0103-synergy-ssp-bsp.pdf

    Should I add Events in BSP ? 

    I have configured the Pins correctly in BSP. Hardware is working fine. facing issued with interfacing GUIX.

    I did not face any issue when tried with Evalutation board PK-S5D9. I was able to create Windows and buttons and it worked fine. Later I started working with Custom Board. 

    SDRAM is  Tested and working fine. I am able to write directly to Frame Buffer and see it on display. But GUIX is not linked properly. 

    trying to find the cause of status = gx_widget_attach(p_window_root, p_first_screen);  No Events Error at this line. 

  • Hi Path,

    No, Events shouldn't be added in BSP, my thought was just that something didn't make the correct logical connection in the BSP when creating the custom board.  What version of the SSP are you using?  The document you attached was last updated over 6 years ago.  These resources are a bit more recent, they may be helpful.

    https://en-support.renesas.com/knowledgeBase/19579117

    https://www.renesas.com/us/en/document/apn/creating-custom-board-support-package-ssp-v120-or-later-application-note?language=en

    -Josh

    If this response, or one provided by another user, answers your question, please verify the answer. Thank you!
    Renesas Engineering Community Moderators
    https://community.renesas.com/
    https://academy.renesas.com/
    https://en-support.renesas.com/knowledgeBase

  • Sorry I forgot to mention. I followed the second link above as well.

    I am using SSP 2.3.0.

    Did several times. I used 7zip to create pack file. BSP files are added to project. only sdram files were added manually to BSP. I am using QSPI. so they were not removed as mentioned in the above link.

    will try once again on Monday 5th Dec. 2022. and update you.

  • SSP 2.3.0 uses the V2 touch panel framework, sf_touch_panel_v2. The V2 touch panel framework doesn't use the messaging framework.

    The last version of the SSP to contain the sf_touch_panel_i2c (the V1 touch panel framework) that the apps note is referring to, was SSP 2.0.0. sf_touch_panel_i2c did use the messaging framework.

  • Hi Jeremy,

    while debugging I am getting below error 

    status = gx_widget_attach(p_window_root, p_first_screen);

    It is giving error of status = 7     TX_NO_EVENTS

    I am stuck here. does this anything to do with Custom BSP ?

  • I believe, you're confusing ThreadX return codes with GUIX return codes. A GUIX return code of 7 means

    GX_PTR_ERROR (0x07) Invalid pointer

    So your p_window_root or p_first_screen is probably a NULL pointer.

    Kind regards,

    Christoph

  • Screen shot of the debug, p_first_screen is not initialized before this line.

    should I initialize it ?  I could find any initialization code for it in Example project PE-HMI