Open leobbditestcom opened 1 year ago
The above changes greatly reduced the hang sequence frequency, but it would still occur with some builds. The following change was tried, and the code is once again not displaying the hang:
@@ -1218,10 +1218,15 @@ NX_PTP_MSG_HEADER hdr;
return;
}
if (hdr.messageType != NX_PTP_MSG_TYPE_SYNC)
{
+ // Restart state sequence.
+ client_ptr -> nx_ptp_client_state = NX_PTP_CLIENT_STATE_LISTENING;
+ client_ptr -> nx_ptp_client_delay_req_timer = -1;
+ client_ptr -> nx_ptp_client_announce_timeout = -1;
+
return;
}
if (((client_ptr -> nx_ptp_client_state != NX_PTP_CLIENT_STATE_WAIT_SYNC) &&
(client_ptr -> nx_ptp_client_state != NX_PTP_CLIENT_STATE_WAIT_FOLLOW_UP)) ||
When the first message seen by the NetX Duo PTP client is not an "Announce" message, the code begins to cycle through a state sequence which keeps it from entering the "Delay_request" sequence. This is prevented by entering NX_PTP_CLIENT_STATE_LISTENING when this happens. The following changes do this: