Hi,
I would like to enable PPS output on my i.MX8-QXP-C0 board, and then I would like to read the output on my oscilloscope. I think I need to enable it on some files of the drivers. Can you please let me know what files and where in the file I should edit?
( I found on file "imx8qxp_mek.c" from the work dir of Yocto. However, I don't know where I should edit.)
Thank you in advance.
Hello @killedByBugs
This post can be useful. There is described how you can enable PPS in linux.
I hope this can helps.
Best regards.
Salas.
Hi Alejandro,
I have fixed the following error
fec 5b040000.ethernet: Start time must larger than current time!
-sh: echo: write error: Invalid argument
by changing the second parameter to a number lager than 'current time'.
echo "0 999 0 1 1" > /sys/class/ptp/ptp0/period
Then, I find the output on my oscilloscope(please see the following image). However, the output waveform is not a square wave. Should I edit some code of the driver or device tree file to get a square wave?
I also tried:
In the 'work dir' of Yocto, I edit 'fec_ptp.c' in directory '/armv8a-mx8-poky-linux/linux-imx-headers/6.1-r0/git/drivers/net/ethernet/freescale/'. However, when I 'bitbake' again, it seems Yocto doesn't build anything with that file. This editing neither solves my problem. Any suggestion?
Thank you in advance,
Hi Alejandro,
I have tried the method on the page you gave me by following steps:
1. run ptp4l:
ptp4l -l 6 -m -i eth0 -p /dev/ptp0 &
2. enable PPS:
echo 1 > /sys/class/ptp/ptp0/pps_enable
3. change the duty cycle of the PPS clock for a close to 50% ratio
echo "0 0 0 1 1" > /sys/class/ptp/ptp0/period
However, in step 3, I have got an error:
fec 5b040000.ethernet: Start time must larger than current time!
-sh: echo: write error: Invalid argument
Do you have any solution to solve this problem? Can you also please explain why this problem happended?
Thank you in advance