Quantcast
Channel: Forum - Recent Threads
Viewing all articles
Browse latest Browse all 5781

Program calls NMI interrupt when "gx_window_event_process" is called at the beginning of a screen transition

$
0
0

Hi all,

I am fairly deep into development with messaging setup and working communicating between 5+ threads.

My touch panel control thread that handles windows and widgets sends only ONE class of messages called "SF_MESSAGE_EVENT_CLASS_SYSTEM_DATA" TO the main thread, and the data is a large structure with all system status.

I needed to add a handful of members to the structure (at max 1000 bytes). So when doing that I increased the stack size for all of my threads using it by 2048 and increased the message que size by the same.

I am still able to compile and run the program with no problem, all the threads are communicating fine except for the touch handler thread. I am able to send "simple messages" with no payload fine (function found in the "out of box" thermostat demo). However if i try to transition to a screen that has a widget case that sends an event WITH a payload, the HMI freezes with the button pressed and calls the NMI interrupt and gets stuck there.

The program does not reach the function call to send the message, but breaks down when calling the macro gx_window_event_process before the switch statement.

The window handler code is below.

UINT window_display_settings_handler(GX_WINDOW *widget, GX_EVENT *event_ptr)
{
UINT result = gx_window_event_process(widget, event_ptr);
     switch (event_ptr->gx_event_type)
     {

     case GX_SIGNAL(ID_BUTTON_SAVE, GX_EVENT_CLICKED):
          clock_digits = 0;
          if(clock_freeze == true){
          sendEvent_system_data(SF_MESSAGE_EVENT_CLOCK_UPDATE, temp_state);
          clock_freeze = false;
          }
     break;

     default:
          result = gx_window_event_process(widget, event_ptr);
     break;
     }
     return result;

}

 

So it must be an issue with my structure or messaging because I comment out the send event function and i am able to transition to and from the screen fine.

Also, this was working fine before adding members to my structure... if i comment out the new members in my struct I also have no problems.

 

Not sure why this is happening so any feedback would be much appreciated.

 

Thank you,

Esteban


Viewing all articles
Browse latest Browse all 5781

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>