cancel
Showing results for 
Search instead for 
Did you mean: 

Does the Ethernet PTP hardware on the STM32H7 board discipline the system clock?

SSone.1
Associate III

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.

1 ACCEPTED SOLUTION

Accepted Solutions
STea
ST Employee

Hello @SSone.1 & @LCE ,

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. 

STea_0-1716550639402.png

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

 

In order to give better visibility on the answered topics, please click on Accept as Solution on the reply which solved your issue or answered your question.

View solution in original post

3 REPLIES 3
nouirakh
ST Employee

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


LCE
Principal

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...

STea
ST Employee

Hello @SSone.1 & @LCE ,

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. 

STea_0-1716550639402.png

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

 

In order to give better visibility on the answered topics, please click on Accept as Solution on the reply which solved your issue or answered your question.