- I have tried to modify my sample above as follows:
void sample_callback() { led = !led; event_flags.set(GET_SAMPLE);}
On LPC1768 it works OK.
- Make sure the most significant bit of an
EventFlagis not set in the program. Otherwise anosFlagsErrormessage is generated:
/** The EventFlags class is used to control event flags or wait for event flags other threads control.
@note
EventFlags support 31 flags. The MSB flag is ignored. It is used to return an error code (@a osFlagsError).
@note
Memory considerations: The EventFlags control structures will be created on the current thread's stack, both for the Mbed OS
and underlying RTOS objects (static or dynamic RTOS memory pools are not being used).
*/
- The following threads could help you get the function name causing the hard fault: