Commit 2d3f7618 authored by Omar Gabella's avatar Omar Gabella

KM3NET BROADCAST : - locking_enable in wr_link_on -> After unplug/plug or…

KM3NET BROADCAST : - locking_enable in wr_link_on -> After unplug/plug or disable/enable the WR master port, the CLB stay locked in Uninitialized servo state because the spll stays locked.
		   - New WR state WRS_BROADCAST -> added for km3net monitoring via net.wr_st_gen variable.
		   - wr_servo_reset if errcount > 5 -> to play in a safe way.
parent 66e9a4fd
......@@ -19,7 +19,15 @@ int wr_link_on(struct pp_instance *ppi, unsigned char *pkt, int plen)
int e = 0;
wrp->wrModeOn = TRUE;
wrp->ops->enable_ptracker(ppi);
#ifdef BROADCAST
/* FOR TEST: spll stay locked because not new phase_target after unplug/plug or disable enable
* master coming port. */
wrp->ops->locking_enable(ppi);
wrp->wrPortState = WRS_BROADCAST; // For KM3NeT monitoring
#else
wrp->ops->enable_ptracker(ppi); // enable_ptracker done in wrp->ops->locking_enable(ppi);
#endif // BROADCAST
if (wrp->wrMode == WR_MASTER)
e = msg_issue_wrsig(ppi, WR_MODE_ON);
......
......@@ -125,6 +125,10 @@ enum {
WR_PORT_CALIBRATION_8,
/* A special send-sync-only state for absolute calibration */
WRS_ABSCAL,
#ifdef BROADCAST
/* A special send-sync-only state for broadcast mode */
WRS_BROADCAST = 188, // -> BC in hexadecimal
#endif
};
/* White Rabbit commands (for new implementation, single FSM), see table 38 */
......
......@@ -464,6 +464,7 @@ int wr_e2e_offset_downlink(struct pp_instance *ppi,
WR_DSPOR(ppi)->ctr_consecutive_incorrect_timestamp++;
/* If errcount > 5 we reset the wrMode so as not get stuck on the
* uninitialized servo state. */
wr_servo_reset(ppi);
// WR_DSPOR(ppi)->wrModeOn = FALSE;
}
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