Re: Reading serial port with event handler
Posted: Wed Jul 30, 2014 8:07 am
Do you have debug options enabled? if so, what you are experiencing is not a crash but a controlled stop caused by the misplaced chSysLock()/chSysUnlock() around a normal function.
You should be stopped in port_halt() and the global variable dbg_panic_msg should point to an error message.
About the "why 1?", you have a mask of pending events, you are associating that event source to the bit 1 of the mask, this is useful in case your thread registers on multiple sources, each one would be assigned to a different bit.
Giovanni
You should be stopped in port_halt() and the global variable dbg_panic_msg should point to an error message.
About the "why 1?", you have a mask of pending events, you are associating that event source to the bit 1 of the mask, this is useful in case your thread registers on multiple sources, each one would be assigned to a different bit.
Giovanni