Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

IEEE 1588 (PTP) Support (IDFGH-110) #1223

Open
ajvpot opened this issue Nov 3, 2017 · 24 comments
Open

IEEE 1588 (PTP) Support (IDFGH-110) #1223

ajvpot opened this issue Nov 3, 2017 · 24 comments
Assignees
Labels
Status: In Progress Work is in progress

Comments

@ajvpot
Copy link

ajvpot commented Nov 3, 2017

Hi,

The datasheet lists the ESP32 as having hardware IEEE 1588 support, but the only reference I can find in the SDK to it is a "TODO" line. Is support for this feature implemented yet?

https://github.com/espressif/esp-idf/blob/master/components/ethernet/emac_main.c#L771

Thanks,
Alex

@ajvpot ajvpot changed the title IEEE 1588 Support IEEE 1588 (PTP) Support Nov 3, 2017
@FayeY FayeY changed the title IEEE 1588 (PTP) Support [TW#16360] IEEE 1588 (PTP) Support Nov 10, 2017
@FayeY
Copy link
Collaborator

FayeY commented Nov 10, 2017

Hi, sorry that there is no update, it is still in our TODO list now. But we will let you know when there is any update.

@ProfFan
Copy link

ProfFan commented Feb 4, 2018

Hi,

We need this feature as well. Can you alternatively provide instructions and references so we can implement this ourselves?

@ghost
Copy link

ghost commented Feb 26, 2018

Would there be a particular PHY required for this? What else is hidden away in the integrated MAC? We could do with IEEE 802.1AS for AVB quality synchronization which is better than the default 1588v2 profile.

Spotted in https://github.com/espressif/esp-idf/blob/master/components/ethernet/emac_desc.h

#define EMAC_DESC_PTP_VERSION (BIT(13))
#define EMAC_DESC_PTP_VERSION_S 13
#define EMAC_DESC_PTP_FRAME_TYPE (BIT(12))
#define EMAC_DESC_PTP_FRAME_TYPE_S 12

@ashish-kamble
Copy link

Hi,
Is the support for hardware ptp feature ready yet ?
Could not find any documentation or software support in official docs released till now.

@rollet
Copy link

rollet commented Feb 19, 2019

Is there any news about PTP status in ESP32 IDF/manuals ? It looks like frame timestamping is available , but there is no indication about clock control, PTP clock triggered interrupt, etc...
Thanks

@projectgus projectgus changed the title [TW#16360] IEEE 1588 (PTP) Support IEEE 1588 (PTP) Support (IDFGH-110) Mar 12, 2019
@Grtschnk
Copy link

I am also very interested in this. :)

I wonder if it would be even possible to combine this with the ESP Mesh functionality (only very briefly looked into it), and as a result, have a swarm of almost-perfectly synced ESP32s.

@rikkertkoppes
Copy link

Very interested also

Any pointers to an implementation would be greatly appreciated

@ajvpot
Copy link
Author

ajvpot commented May 16, 2019

@Grtschnk Unfortunately, I don't think that would work. IEE1588 is an Ethernet feature. You'd need to be using a wired connection with a MAC.

You may have some luck with https://gitlab.com/painlessMesh/painlessMesh

@peterjeremy
Copy link

The ESP32 TRM shows that the Ethernet MAC supports IEEE1588-2008. IEEE802.1AS includes support for PTP over WiFi but AFAIK, the ESP32 doesn't support that.

@brianbienvenu
Copy link

Any updates on this? Functional 1588v2 PTP support (ie, more than datasheet support) on the ESP32 would enable some interesting applications.

@tionebrr
Copy link

Bump !
It would be great to get support for the IEEE1588 hardware or some documentation at least !

@chuledeco
Copy link

I'm interested on this too!!!

@chuledeco
Copy link

Does anyone found the way to implement PTP on ESP32?

@callumbrieske
Copy link

Is there any further news on this?
The documentation for these features seems to be missing some information.

Where is the 'timestamp' DMA'd from? IE What is the source timer?
How do you enable the "Advanced Timestamping" features? I cant get the timestamps for either TX of RX frames, and the tech ref manual is very vague on the specifics of enabling these features.

Do these features actually exist as advertised, or have they never actually worked?

@tionebrr
Copy link

tionebrr commented Aug 3, 2020

@callumbrieske I didn't tried to go further on this.
I think the 1588 timestamping may be a bit hard to make on an MCU and is not interesting for enough people. So the manufacturers just drop it. STMicro also had advertized PTP support for their Cortex MCUs, but have now removed the documentation for it. It seems like NXP are still supporting 1588 with code examples.
I think I'll just use an ethernet PHY with 1588 support (from Microchip). It might be more reliable on the long run as I can write my lib for that phy (or switch) and port it on any target.

@doragasu
Copy link

Any news? Even if difficult, if doable, I am also interested. Maybe if we could have documentation about registers, we could implement it ourselves.

@tionebrr
Copy link

I didn't get any further on that.

@espressif-bot espressif-bot added the Status: In Progress Work is in progress label May 18, 2021
@espressif-bot espressif-bot added Resolution: Won't Do This will not be worked on Status: Cancelled Status: Opened Issue is new and removed Status: In Progress Work is in progress Resolution: Won't Do This will not be worked on Status: Cancelled labels Jul 30, 2021
@TooDissing
Copy link

Any updates on this? No real update since 2017...

@ankurrajw
Copy link

I am also interested for this feature and hope it would be added to the ESP-IDF in the later releases.

@ElliottSeer
Copy link

ESP32-C6 有希望实现这个功能吗

@rollet
Copy link

rollet commented Jan 19, 2023

ESP32-C6 有希望实现这个功能吗

No Ethernet interface on ESP32-C6 from my knowledge...

@callumbrieske
Copy link

Hopefully the ESP32-P4 will have working 1588.

@jack0c
Copy link
Collaborator

jack0c commented Apr 12, 2023

ESP32-P4 will support PTP.

@doragasu
Copy link

doragasu commented Apr 12, 2023

That's great news, thanks for commenting!

EDIT: oh, but P4 does not have radio :(

@espressif-bot espressif-bot added Status: In Progress Work is in progress and removed Status: Opened Issue is new labels Jul 10, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Status: In Progress Work is in progress
Projects
None yet
Development

No branches or pull requests