Good news!I was using the ground from the "regular" gpio pins, that's pin 6 I believe (the one next to the two 5 V pins).You're on the right pin. What are you using as ground? The other pin in the USB_OTG pair works.
You should have the ethernet plugged into a switch: the hardware timestamping functionality doesn't work without a carrier.
It's a very short pulse, and on my cheapo oscilloscope (FNIRSI 1013D) I had to do quite a lot of fiddling around to get it to show up: T to 1uS/div and trigger mode of single.
I had ethernet connected to it (with link).
What voltage should I expect from that pin? 3.3 V? or 1.8 V? Because with 3.3 V I could connect an ESP32 to it and let that get triggered for each pulse emitting a text via the serial (usb) port.
I connected an ESP to the SYNC-OUT pin with the program I suggested and behold:
Code:
308922666309922657310922648...
The (trivial) ESP8266 program to monitor is:
Code:
volatile uint32_t us = 0;void ICACHE_RAM_ATTR capture() { us = micros();}void setup() { Serial.begin(115200); pinMode(D2, INPUT); attachInterrupt(D2, capture, RISING); Serial.println(F("Go!"));}uint32_t pus = 0;void loop() { if (pus != us) { Serial.println(us); pus = us; }}
(After sudo ./testptp -d /dev/ptp0 -p 1000000000 -L 0,2 -w 4095)
So indeed it was a too-small-pulse to detect for my el cheapo hantek scope.
Statistics: Posted by flok99 — Wed Dec 25, 2024 5:01 pm