The usual cause are missing "volatile" declarations for global variables that are changed in an interrupt handler.
Thank you Bob!
Which are the unusual cases ?
I have 3 ISR on each of the two project included in the workspace.
I check all the volatile variable declaration out and them are OK and declared with "extern" on each .c file where they need to be used.
I have already posted to you this workspace in a previous post.
I set the release build setting for each of two project.
I verified that the sensor project work OK with Release set.
"The Gateway project does not."
But the funny or not funny thing is that the Gateway project with debug set work OK with the Sensor project with release set.
Please see attached project.
Thank you for your help Bob
The difference between debug and release modes is mainly the optimization level. Release mode is usually smaller and runs faster than debug mode. This can lead to race conditions.
You can set the optimization for every file separately: right click on the file in workspace explorer and select build properties, so you may find the file in error.