Hi kko-smol,
Xavier time is already in sync with network on boot.
To synchronize your HW precisely, can you try following steps if you are not dependent on ethernet module:
- Enable CONFIG_TEGRA_HTS_GTE=y
- Modify kernel dtb:
gte@c1e0000 {
status = “okay”;
} - Run GTE userspace sample application on target device:
In this example application, we are toggling 40-pin header Pin 16 (gpio=256) and feeding signals to Pin 32(gpio=257) every 1 second.
In the kernel source code: - locate tegra-gte-ioctl.h
- copy it to /usr/include/linux/
- locate tegra_gte_mon.c and compile gcc tegra_gte_mon.c -o gte_mon
- Run app, ./gte_mon -d gtechip0 -g 257 -r -f &
4.a) ./gte_mon -h to print usage. - echo 256 >/sys/class/gpio/export
- echo out >/sys/class/gpio/gpio256/direction
Start toggling GPIO 256 to observe the event. - while true: do
echo 1 >/sys/class/gpio/gpio256/value
echo 0 >/sys/class/gpio/gpio256/value
sleep 1
done
//This should print below message.
HW timestamp GPIO EVENT xxxx - echo 0 >/sys/class/gpio/gpio256/value
HW timestamp GPIO EVENT yyyy - To close the app, execute fg and ctrl+c
- echo 256 >/sys/class/gpio/unexport to release GPIO 256
This will produce pps signals on GPIO pin 32 precisely.
See if this can synchronize your hardware.
Thanks,
Shubhi