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.

Parents
  • 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. 

Reply
  • 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. 

Children