I'm using app_scheduler to pass UART events in the "main thread". I'm storing multiple data types in a struct (arrays, integers) and I've set the max event size to the size of this struct. What I'm seeing is that between app_sched_event_put and the actual event executing in the main thread, the data passed to app_sched_event_put is often overwritten. Sometimes partially, sometimes fully, even the integers inside the struct. I've tried debugging but I haven't been to find out what's writing to the buffer.
I'm using the APP_SCHED_INIT MACRO to initialize app_scheduler so the buffer should be defined by the library and thus I shouldn't have to worry about the buffer myself, correct?