NUCLEO-H7S3L8 | ETH Register Problem - MACTSCR Bit 5 Stays SET (IEEE 1588 Timestamping)
I'm working on implementing Precision Time Protocol (PTP) on the STM32H7S3L8 Nucleo board. I have followed the steps outlined in section 64.9.9 Programming Guidelines for IEEE 1588 Timestamping from the reference manual. (github: stm32h7_ptpd)
/* Mask the timestamp trigger interrupt */
ETH->MACIER &= ~(ETH_MACIER_TSIE);
/* Program the Subsecond increment register based on the PTP clock frequency. */
ETH_SetPTPSubSecondIncrement(ADJ_FREQ_BASE_INCREMENT); /* to achieve 20 ns accuracy, the value is ~ 43 */
if (UpdateMethod == ETH_PTP_FineUpdate)
{
/* If you are using the Fine correction method, program the Time stamp addend register
* and set Time stamp control register bit 5 (addend register update). */
ETH_SetPTPTimeStampAddend(ADJ_FREQ_BASE_ADDEND);
ETH_EnablePTPTimeStampAddend();
/* Poll the Time stamp control register until bit 5 is cleared. */
while(ETH_GetPTPFlagStatus(ETH_PTP_FLAG_TSARU) == SET);
}
/* To select the Fine correction method (if required),
* program Time stamp control register bit 1. */
ETH_PTPUpdateMethodConfig(UpdateMethod);
/* Program the Time stamp high update and Time stamp low update registers
* with the appropriate time value. */
ETH_SetPTPTimeStampUpdate(ETH_PTP_PositiveTime, 0, 0);
/* Set Time stamp control register bit 2 (Time stamp init). */
ETH_InitializePTPTimeStamp();
/* Set PPS frequency to 128 Hz */
ETH_PTPSetPPSFreq(7);
However, I'm facing an issue at step 5 (line 14), which states: "Poll the Timestamp Control Register (ETH_MACTSCR) until bit 5 is cleared." In my case, the 5th bit of the ETH_MACTSCR register remains SET indefinitely and does not clear as expected. But the exact same code works fine on STM32H743 Nucleo board.
- Has anyone encountered a similar issue with the ETH_MACTSCR register on the STM32H7S3L8?
- Are there any known workarounds or additional steps that I might be missing to ensure this bit clears properly?
- Could there be a hardware-specific issue or a potential bug in the microcontroller that I should be aware of?





