Quantcast
Viewing all articles
Browse latest Browse all 4867

Compute Module • Re: SYNC_OUT pin on CM5 IO board

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 was using the ground from the "regular" gpio pins, that's pin 6 I believe (the one next to the two 5 V pins).
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.
Good news!
I connected an ESP to the SYNC-OUT pin with the program I suggested and behold:

Code:

308922666309922657310922648...
These are microseconds.

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;  }}
Just connect GND to a GND of the pi and D2 of the wemos d1 mini to pin 6 of the pi and presto.
(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



Viewing all articles
Browse latest Browse all 4867

Trending Articles