lpcware

LPC4357 MAC RX engine hangs & cannot be recovered

Discussion created by lpcware Employee on Jun 15, 2016
Latest reply on Jun 15, 2016 by lpcware
Content originally posted in LPCWare by peterrq on Wed Sep 17 09:50:43 MST 2014
I have come across a possible silicon issue.
When using the LCP 4357 PTP function.
I enable PTP with: MAC_TIMESTAMP_CTRL set to TSENA, TSCFUPDT and TSIPV4ENA (0x2003)
If I then allow the MAC unit to run out of DMA descriptors, for example connected to a network with broadcast chatter and then sleep for 1 second before the host polls LwIP & copies data and release the descriptor) then the RX engine will permanently stop receiving data.
RU is set as expected but even after releasing the DMA descriptor (OWN) and commanding DMA_REC_POLL_DEMAND reception will not restart.
I note that in this mode the MAC_DEBUG register reads 0x340.
Previously I have only ever seen the MAC_DEBUG as 0x0.
If I remove TSIPV4ENA from the initialisation code (0x03) then RX will not stall.
[s]I have yet to determine if I can live without TSIPV4ENA.[/s]
EDIT: I need IPV4 & issue also present in other modes

With TSIPV4ENA enabled the PTPd library reports that I get a good lock to the master clock although I have not yet confirmed that clocks are synchronised.
It looks therefore like the PTP functions work except when you run out of DMA descriptors.

Please recommend a work around.

As a secondary question: is there a way of generating an external event based on the PTP clock? I note that I can cause an interrupt using the TARGET TIME registers but was hoping that I could get the hardware to generate a pulse.

Outcomes