don't want to miss the EB because of wrong state caused by inhibit timer.
@@ -615,7 +615,8 @@ port_INLINE void activity_synchronize_newSlot(void) {
port_INLINE void activity_synchronize_startOfFrame(PORT_TIMER_WIDTH capturedTime) {
// don't care about packet if I'm not listening
- if (ieee154e_vars.state!=S_SYNCLISTEN) {
+ // in case serial rx is started, we don't want to loss this packet because of wrong state machine, so capture the state here
+ if (ieee154e_vars.state!=S_SYNCLISTEN && ieee154e_vars.state!=S_SYNCRXSERSTART) {
return;
}
@@ -624,6 +625,8 @@ port_INLINE void activity_synchronize_startOfFrame(PORT_TIMER_WIDTH capturedTime
// change state
changeState(S_SYNCRX);
+ // there is no action when the timer fired at S_SYNCRX.
+ // hence the inhibit timer scheduled at beginning of slot won't be effected.
// record the captured time
ieee154e_vars.lastCapturedTime = capturedTime;
