cancel
Showing results for 
Search instead for 
Did you mean: 

STM32F427 PTP Implementation

emre ozdemir
Associate III
Posted on May 30, 2018 at 12:08

Hi everyone,

We are using the STM32F427.We have devices that need to work synchronously.So we decided to use PTP but we have no experience in this matter.

I have reviewed the AN3411 document to learn how to use PTP.But I do not fully understand and I can't implement it.

I could not find the project mentioned in this file.I also could not find the PTP libraries.(ptpd-1.0.0 & ptpd-2.0.0).

We are currently using our devices as a tcp server.

We don't use RTOS.

Any help would be great.

#an3411 #ieee-1588 #ptp #stm32f427
20 REPLIES 20
AvaTar
Lead
Posted on May 30, 2018 at 12:36

Some while ago worked on the implementation of time correction based on PTP, but on a x86 device under VxWorks.

If I remember correctly, you need a working IP stack. And in my experience, you are already running into trouble here.

A Cortex M4 (ST as well as others) is definitely not capable of following a busy 100MB/s ethernet traffic, let alone 1GB/s. You can expect the network code to eat up most of available performance, and still having missed packets.

Look closely at Fig.17 of said AN3411 document. There are only PTPv2 messages visible in the Wireshark log, with no visible filter activated. This is not quite a real-world scenario for networks.

But to be fair, I didn't try the last few month ...

Imen.D
ST Employee
Posted on May 30, 2018 at 13:29

Hello

_ZDEM_R.Emre

,

The application note

AN3411it is not available on ST web site, it is obsolete.

Currently, ST doesn't provide the PTP feature.I will raise your request to our development team to implement this feature. But, unfortunately is not at the short term planning.

With Regards,

Imen.

When your question is answered, please close this topic by clicking "Accept as Solution".
Thanks
Imen
Posted on May 30, 2018 at 14:20

>>Currently, ST doesn't provide the PTP feature.

Support for IEEE 1588 is still listed on the part's sell sheet and data sheet... Perhaps someone at ST can dig up some basic validation work that supports the specs.

Not sure if the Ethernet uses this

https://www.synopsys.com/dw/ipdir.php?ds=dwc_ether_mac10_100_universal

 

http://www.st.com/content/st_com/en/products/microcontrollers/stm32-32-bit-arm-cortex-mcus/stm32-high-performance-mcus/stm32f4-series/stm32f427-437/stm32f427ai.html

 
Tips, Buy me a coffee, or three.. PayPal Venmo
Up vote any posts that you find helpful, it shows what's working..
Posted on May 30, 2018 at 14:28

I think that's why some of the support is in hardware, to achieve some level of time-transfer.

Now whether that's applicable to real world applications, I don't know, got to be better than NTP, and someone surely must have done some basic validation to put the claim in the data sheet.

https://www.synopsys.com/dw/ipdir.php?ds=dwc_ether_mac10_100_universal

 

My problem isn't that it might not work in a totally desirable fashion, but the amount of work needed to even evaluate it, ST really should have examples supporting items they keep calling out on slide decks and sell sheets. These should be the dev teams priority drivers.

Tips, Buy me a coffee, or three.. PayPal Venmo
Up vote any posts that you find helpful, it shows what's working..
Posted on May 30, 2018 at 14:49

I think that's why some of the support is in hardware, to achieve some level of time-transfer.

For instance with using an ethernet phy that can store several 'Jumbo frames', before bothering the main processor.

Now whether that's applicable to real world applications, I don't know, got to be better than NTP, and someone surely must have done some basic validation to put the claim in the data sheet.

As other network applications, I have no doubt it runs nicely in a controlled environment, meaning a very limited number of network nodes and frames/protocols. And I'm sure ST application engineers (like those of competitors) noticed the fragility of network applications. But the whole IoT thing is such a great marketing opportunity - accross-the-board of MCU manufacturers...

cwparker
Associate II

​ST really needs step up on this. The IEEE 1588 hardware support in the STM32Fxxx is really good, but lack of good documentation and sample code is preventing or at least making it hard for people to use it. AN3411 (which is no longer available on the ST website) is very helpful in understanding how to configure the PTP registers, but having current demonstration software would make it a lot easier for developers to understand how to program them. The hardware even provides sniffing for the IEEE 1588 packets, but thee is absolutely NO documentation on how this work.

Come on ST, you put a lot of time into adding this hardware to the STMFxxx, how about documenting it so people can easily use it?

Clint

anotherandrew
Senior

Check out the repo at https://github.com/mpthompson/stm32_f4_ptpd -- it looks like it is the rescued AN3411 PTP implementation ported to the STM32F4-Discovery boards. Porting it to your specific hardware looks to be straightforward. Time stamping is not supported in the STM32 HAL (not even through an extension API) but the code in that repo shows how it was done for the other devices. It looks like your specific device is already supported by that repo.

With all due respect, STMicro should not be removing example code from their site unless they have an updated version available. In fact I would argue that old implementations can be useful for understanding why changes were made.

Cedric Boudinet
Associate III

Hello

This topic is quite old, but is there any new information about ptp integration into HAL?

Bests