2026-05-14 4:26 PM - edited 2026-05-14 4:39 PM
On line 1695 of stm32h5xx_hal_eth.c ETH_MACTSCR_TSUPDT is used to set the timestamp counter, however page 2934 of RM0481 says this bit is used to add or subtract from the timestamp counter instead:
Based on the description of this function, and its use elsewhere, this function should instead use ETH_MACTSCR_TSINIT to overwrite the timestamp counter. As it is at the moment, the current time is added to the counter every time there is a PTP sync meaning the time fluctuates wildly over a century and a half span, and the time is never close enough to use fine adjustment methods.
Also consider adding a line to enable PLL1Q's output to the HAL Ethernet init function, that was another fun bug to track down...