Commit 49bb1387 authored by Adam Wujek's avatar Adam Wujek 💬

merge abscal

parents 8ff9e3ea efa50a79
......@@ -58,4 +58,10 @@ int board_update(void);
#define HAS_IP 0
#endif
#ifdef CONFIG_ABSCAL
#define HAS_ABSCAL 1
#else
#define HAS_ABSCAL 0
#endif
#endif /* __BOARD_WRC_H */
......@@ -103,6 +103,10 @@ static int bootp_poll(void)
if (ip_status != IP_TRAINING)
return 0;
/* no extra traffic when abscal is in progress */
if (HAS_ABSCAL && ptp_mode == WRC_MODE_ABSCAL)
return 0;
if (len > 0)
ret = process_bootp(buf, len);
......
......@@ -245,6 +245,10 @@ static int lldp_poll(void)
uint8_t new_mac[ETH_ALEN];
static uint8_t old_mac[ETH_ALEN];
/* no extra traffic when abscal is in progress */
if (HAS_ABSCAL && ptp_mode == WRC_MODE_ABSCAL)
return 0;
/* periodic tasks */
if (ticks > LLDP_TX_TICK_INTERVAL) {
get_mac_addr(new_mac);
......
ppsi @ 0cc9d341
Subproject commit cb5934e8dac07c21572d335a5691ea714eeebf57
Subproject commit 0cc9d3419e9792f2c0949fc12d33a8e0709223a3
......@@ -339,10 +339,7 @@ void spll_init(int mode, int slave_ref_channel, int align_pps)
mpll_init(&s->aux[i].pll.dmtd, slave_ref_channel, spll_n_chan_ref + i + 1);
s->aux[i].seq_state = AUX_DISABLED;
}
if(mode == SPLL_MODE_FREE_RUNNING_MASTER)
PPSG->ESCR = PPSG_ESCR_PPS_VALID | PPSG_ESCR_TM_VALID;
for (i = 0; i < spll_n_chan_ref; i++)
ptracker_init(&s->ptrackers[i], i, PTRACKER_AVERAGE_SAMPLES);
......
......@@ -132,7 +132,6 @@ int external_align_fsm(volatile struct spll_external_state *s)
case ALIGN_STATE_INIT_CSYNC:
if (PPSG->ESCR & PPSG_ESCR_SYNC) {
PPSG->ESCR = PPSG_ESCR_PPS_VALID; // enable PPS output (even though it's not aligned yet)
s->align_timer = timer_get_tics() + 2 * TICS_PER_SECOND;
s->align_state = ALIGN_STATE_WAIT_CSYNC;
done_sth++;
......
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