Commit c1f14ffa authored by Omar Gabella's avatar Omar Gabella

KM3NET BROADCAST : Reset the wr_servo after announce timeout. Announce timeout increased to 450.

parent 6f577f41
......@@ -27,7 +27,11 @@
#define PP_DEFAULT_DELAYREQ_INTERVAL 0
#define PP_DEFAULT_SYNC_INTERVAL 0 /* -7 in 802.1AS */
#define PP_DEFAULT_SYNC_RECEIPT_TIMEOUT 3
#define PP_DEFAULT_ANNOUNCE_RECEIPT_TIMEOUT 20 /* 3 by default */
#ifdef BROADCAST
#define PP_DEFAULT_ANNOUNCE_RECEIPT_TIMEOUT 450 /* 3 by default */
#else
#define PP_DEFAULT_ANNOUNCE_RECEIPT_TIMEOUT 20 /* 3 by default */
#endif
/* Clock classes (pag 55, PTP-2008). See ppsi-manual for an explanation */
#define PP_CLASS_SLAVE_ONLY 255
......
......@@ -96,6 +96,14 @@ int st_com_execute_slave(struct pp_instance *ppi)
} else {
ppi->next_state = PPS_LISTENING;
pp_timeout_set(ppi, PP_TO_ANN_RECEIPT);
#ifdef BROADCAST
/* Reception Announce timeout expires, the link must be rebooted. */
if (ppi->state == PPS_SLAVE) { // Reboot only if we are on slave state.
WR_DSPOR(ppi)->linkUP = FALSE; // ptpPortDS->linkUP = FALSE; // In PTPWRd
shw_pps_gen_enable_output(0);
wr_servo_reset(ppi);
}
#endif
}
}
return 0;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment