Hi All,
I configure my device as a PTP master, and I expect to receive PTP timestamps when I send a Sync.
ENET->MAC_TIMESTAMP_CTRL is configured like this:
ENET->MAC_TIMESTAMP_CTRL |= ENET_MAC_TIMESTAMP_CTRL_TSENA_MASK;
ENET->MAC_TIMESTAMP_CTRL |= ENET_MAC_TIMESTAMP_CTRL_TSCFUPDT_MASK;
ENET->MAC_TIMESTAMP_CTRL |= ENET_MAC_TIMESTAMP_CTRL_TSIPV4ENA_MASK;
ENET->MAC_TIMESTAMP_CTRL |= ENET_MAC_TIMESTAMP_CTRL_TSVER2ENA_MASK;
ENET->MAC_TIMESTAMP_CTRL &= ~ENET_MAC_TIMESTAMP_CTRL_SNAPTYPSEL_MASK; // 00
ENET->MAC_TIMESTAMP_CTRL &= ~ENET_MAC_TIMESTAMP_CTRL_TSENALL_MASK;// not all timestamps, i want only sync
ENET->MAC_TIMESTAMP_CTRL |= ENET_MAC_TIMESTAMP_CTRL_TSMSTRENA_MASK;// ptp master
After digging a lot, I see that I need to add
txFrame.txConfig.tsEnable=1;
in err_t ethernetif_linkoutput(struct netif *netif, struct pbuf *p)
But, when I add this tsenable, all the packets are timestamped !
i can receive the timestamp in static void ethernet_callback(...)
when ther's a kENET_TxIntEvent,.
Here're my questions:
* why is there many settings in ENET->MAC_TIMESTAMP_CTRL, but it seems that there's just the .tsEnable that's is used to activate timestamp for a packet.
* if there's no other better way to do the job, how can I discriminate sent packets in ethernet_callback(...) to reclaim (or not) the timestamps.
Is there somewhere an updated documentation about this lpc554s018 (and family) ?
regards