Getting timestamps for transmitted PTP datagrams
Hi,
I am implementing PTP slave on bare metal H743II with firmware 1.12.1 and LwIP 2.1.2.
Timestamps for transmitted PTP datagrams can be received by implemented a callback function HAL_ETH_TxPtpCallback(). The callback is called from stm32h7xx_hal_eth.c:HAL_ETH_ReleaseTxPacket(). There was no call to HAL_ETH_ReleaseTxPacket(), so I added a call to it after calling udp_sendto().
The callback function was never called because HAL_ETH_ReleaseTxPacket() never found a packet in use with timestamp in the descriptor. I copied the timestamp handling from HAL_ETH_ReleaseTxPacket() to HAL_ETH_Transmit(). That seems to work, but is a workaround that probably conflicts with the design.
Any suggestion for a better solution is appreciated.
