The H7 datasheet mention support for IEEE 1588 (the Precision Time Protocol) but I was unable to find any example or API reference about it.
Someone has used or implemented it?
Thank you
The H7 datasheet mention support for IEEE 1588 (the Precision Time Protocol) but I was unable to find any example or API reference about it.
Someone has used or implemented it?
Thank you
It is described in an RFC (request for comment) from the IETF (internet engineering task force).
This memo defines a portion of the Management Information Base (MIB)
for use with network management protocols in internets based on TCP
or IP. In particular, it defines objects for managing networks using
the Precision Time Protocol (PTP), specified in IEEE Std. 1588-2008.
(No implementation known)
Some implementation exists for other MC, so why H7 datasheet mention it if none (or at least some documentation) is available?
so why H7 datasheet mention it ...
Because the H7 uses PTP, simple as that.
Your other question,
why there is none (or at least some documentation) is available
is not valid, as there is documentation, just not where you expect it.
To state it positively: Datasheets are great, and some are even better.
I'm sorry but I don't get your answer (I'm not good at jokes)
I understand that the documentation is not where I expect it, that's why I have not found it.
So where is it?
The only mention I've found is in the stm32h747xi datasheet which says:
"Supports hardware PTP (precision time protocol) in accordance with IEEE 1588 2008 (PTP V2) with the time stamp comparator connected to the TIM2 input"
But I've found no libraries/docs/example on how to use it
Thanks
What are you actually trying to do? Write a PTP library?
PTP requires some low-level features of the ethernet stack, the H7 has support for the feature. That's all. It doesn't mean the H7 has a builtin PTP implementation you can just use.
Sorry, it is not a joke.
To state it positively: Datasheets are great, and some are even better.
To state it negatively: some datasheets are incomplete or even crap.
Apparently the H7 uses PTP but does not document the protocol in its datasheet.
The reason for this we can only guess at as we are not the writers of that document.
(datasheets are often written as team effort).
So my guess is that they did not document it as there is another document describing it, which can be found with 5 seconds of googling (no offence intended).
I understand that the documentation is not where I expect it, that's why I have not found it.
So where is it?
I placed a link in post number 2 above. just click it.
But I've found no libraries/docs/example on how to use it
For the documents you need to read the RFC document, which explains the protocol in detail. A programmer can implement it
As I stated, also in post number 2 above I do not know any libraries or implementation or examples. However you state in post number 3 that Some implementation exists for other MC, So you are aware of other implementations.
One option is to convert one those implementations to Arduino code or let someone else do it for you (there is a paid gigs and collaboration section on this forum).
Another option is to implement it from the specification in the RFC. Please be aware that this might be a steep learning curve.
Googled "Arduino PTP precision time library" and found this
As it seems to be ESP specific, some conversion / adaption is probably needed.
You may ask the author of that library ?
No idea if the full RFC is implemented
Note that PTP has a number of options, in particular for hardware vs software timestamping. With a software timestamp, no special stack or hardware is required, but the precision is limited. You can get better precision with hardware stamping, but it requires low level support (which is what the H7 datasheet is referring to).
So the question is what level of precision is required?
So the answer is: "AFAIK there's (still) no H7 specific implementation or documentation, if you need it you have to implement it by yourself starting from RFC or from existing code for other hw"
simple
thank you
No big prcision is needed: ms should be enough.
In that case, you don't really need PTP, NTP would be sufficient.