Other Parts Discussed in Thread: SYSCONFIG
Tool/software:
Hello everyone,
I managed to implement ptp in my SoM VAR-SOM-AM62. Now I have to test pps. For this I installed testptp.
In the device tree of the board I have the following:
&cpsw3g {
status = "okay";
pinctrl-names = "default";
pinctrl-0 = <&main_rgmii1_pins_default
&main_rgmii2_pins_default>;
cpts@3d000 {
/* MAP HW3_TS_PUSH to GENF1 */
ti,pps = <2 1>;
};
};
#define K3_TS_OFFSET(pa, val) (0x4+(pa)*4) (0x10000 | val)
×ync_router {
status = "okay";
pinctrl-names = "default";
pinctrl-0 = <&cpsw_cpts>;
/* Use Time Sync Router to map GENF1 input to HW3_TS_PUSH output */
cpsw_cpts: cpsw-cpts {
pinctrl-single,pins = <
/* pps [cpsw cpts genef1] in17 -> out12 [cpsw cpts hw3_push] */
K3_TS_OFFSET(12, 17)
/* pps [cpsw cpts genef1] in17 -> out22 [SYNC2_OUT pin] */
K3_TS_OFFSET(22, 17)
>;
};
};
&main_pmx0 {
pps_pins_default: pps-default-pins {
pinctrl-single,pins = <
AM62X_IOPAD(0x01d8, PIN_OUTPUT, 3) /* (C15) MCAN0_TX.SYNC2_OUT */
>;
};
};
Like you see i configured the SYNC2_OUT of time sync router to output the signal of GENF1. But i can not measure this signal on the oszilloscop.
Another problem with the testptp program: when i want ot get the timestamping value out of cpsw cpts hw3_push i get an error. And when i want to test the GENF1 that i configured i get an error.
-
root@am62x-var-som:~# testptp -d /dev/ptp0 -p 500000000 -i 1
PTP_PEROUT_REQUEST: Invalid argument (1 refers to genf1 that i configured) - root@am62x-var-som:~# testptp -d /dev/ptp0 -p 500000000 -i 0
periodic output request okay (0 is genf0 that i did not configured) - root@am62x-var-som:~# testptp -d /dev/ptp0 -e 5 -i 2
PTP_EXTTS_REQUEST: Invalid argument (2 refers to hw3 push that i configured)
PTP_EXTTS_REQUEST: Invalid argument - root@am62x-var-som:~# testptp -d /dev/ptp0 -e 5 -i 3
external time stamp request okay (3 is hw4 that i did not configured and it hangs here and nothing else happens)
This is wierd, because i use genf1 not genf0 and the hw3 push pin of cpts not anything else.
Can someone helps?
Thank you
BR
Zain