2024-05-15 10:59 AM
Hello, using the Ethernet PTP hardware on the STM32H743 processor in slave mode, I synchronize my clock's value and counting speed within the Ethernet peripheral to that of the master device.
Is the system clock used by the processor core to execute instructions synchronized with the clock within the Ethernet peripheral?
Does the PTP hardware only synchs my clock within the Ethernet peripheral to the master?
In other words; Can I synchronize the system clock(not the ethernet clock) of the STM32H743 processor with the clock of the PTP master device on the Ethernet network using the Ethernet PTP hardware?
Thanks in advance.
Solved! Go to Solution.
2024-05-24 04:39 AM
indeed, the output signal PTP "PPS" signal can be mapped to trigger a timer which can be used as a timebase to synchronize the H7 clock or synchronize the HSI drift as shown here.
this can be quite a demanding task to do and to get it working precisely as the you will lose the Syncro capabilities and order of magnitude.
BR
2024-05-24 02:15 AM
Hello @SSone.1 ,
To answer your first question, It is incorrect to state that the system clock that drives the processor core is inherently synchronized with the Ethernet peripheral's clock. In fact, they are separate entities.
Secondly, it should be noted that the PTP hardware within the Ethernet peripheral is specifically designed to synchronize the Ethernet clock with the PTP master clock on the network.
For the final question, the answer is not Not directly. The PTP hardware in the Ethernet peripheral does not synchronize the STM32H743's system clock with the PTP master clock. It is designed to synchronize the Ethernet peripheral's time-stamping mechanism with the network clock for Ethernet operations.
I hope my answer has helped you. When your question is answered please close this topic by marking as Best the reply that answered you, it will help others find that answer faster.
Thanks for your contribution.
With Regards,
Kholdoun
2024-05-24 02:52 AM - edited 2024-05-24 03:50 AM
Edit: short answer to topic title: absolutely no.
The PTP hardware only provides several registers in the ETH MAC, and you can already do some filtering for PTP messages with the ETH descriptors.
The only "clock" you can get out of the H7 hardware is the ETH's PTP "PPS" signal, and with this you have to work.
And it's lots of work.
There's a PTPd for the F4 series somewhere on github, I started with that, modified it heavily (mostly because it was blocking), added some hardware, ... It's working now, but cost me some...
2024-05-24 04:39 AM
indeed, the output signal PTP "PPS" signal can be mapped to trigger a timer which can be used as a timebase to synchronize the H7 clock or synchronize the HSI drift as shown here.
this can be quite a demanding task to do and to get it working precisely as the you will lose the Syncro capabilities and order of magnitude.
BR