This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

AM6442: GPEVM How to Check 1 PPS?

Part Number: AM6442

Hi, 

I used TMDS64GPEVM and running PRP exampled with PTP 1588.

My board is synchronized with GPS PTP equipment, and I checked the board sync state via debugging.

but, I don't know how to get 1 pps from the board. 

I guessed and tried to check the J18 as shown below.

J18 shows me the 1 pulse per 1 millisecond.

What am I missed for?

  • Hello,

    Updated PPS documentation

    We just updated the PPS example documentation for SDK 9.0. You can find the updated page in the Linux SDK here:
    https://software-dl.ti.com/processor-sdk-linux/esd/AM64X/09_00_00_03/exports/docs/linux/Foundational_Components/Kernel/Kernel_Drivers/Network/CPSW-PTP.html

    Where is the PPS output routed onto a processor pin?

    That documentation does a good job of discussing how the PPS signal can be routed out of the CPSW CPTS module through the time sync router, and routed back to the CPTS to timestamp that PPS signal. What the documentation does NOT show, is that the AM64x Linux devicetree file also routes the PPS signal to a SYNC_OUT pin:

    k3-am642-evm.dts

            cpsw_cpts_pps: cpsw-cpts-pps {
                    pinctrl-single,pins = <
                            /* pps [cpts genf1] in22 -> out37 [cpts hw8_push] */
                            TS_OFFSET(37, 22)
                            /* pps [cpts genf1] in22 -> out26 [SYNC1_OUT pin] */
                            TS_OFFSET(26, 22)
                            >;
            };
    };
    

    But something is off here. Note that if we check the Technical Reference Manual (TRM) table "TIMESYNC_INTRTR0 Hardware Requests (Outputs)", se see that out26 is actually SYNC2_OUT, not SYNC1. Additionally, this is NOT a PRU SYNC signal as the comment indicates. I have filed a bug to fix the comments in a future software release.

    From the AM64x datasheet, SYNC2_OUT goes to pin A17. But when we check the schematic and Linux devicetree, it looks like A17 is already used for MCAN, and not connected to any useful headers. Looks like we'll need to update more than the comments...

    Ok, let's quickly check the other SYNCx_OUT signals:
    SYNC0_OUT - pin D18, currently muxed to ECAP0_IN_APWM_OUT instead of SYNC0_OUT, but goes to J12 on the EVM
    SYNC1_OUT - pin A19, seems to be used by the EXT_REFCLK signal already, no useful headers
    SYNC3_OUT - pin B17, used for MCAN, no useful headers

    Next steps: test and let us know if it works! 

    Ok, can I get you to try modifying your devicetree, and seeing if we can see that PPS signal on J12, getting sent out through the SYNC0_OUT signal? Once you let me know whether it works for you, I'll make a note for us to update the default EVM devicetree to match your changes.

    1) change the timesync router entry from out26 (SYNC2_OUT) to out24 (SYNC0_OUT)

    2) update the pinmux settings for D18 to mux out the PPS signal instead of the ECAP signal. Best practice would be to disable the ECAP node if you are not going to use it, but pinmux settings need to be associated with an enabled devicetree node to be applied. So for now, let's leave the ECAP node enabled, and just change the pinmuxing like this:

            main_ecap0_pins_default: main-ecap0-pins-default {
                    pinctrl-single,pins = <
                            AM64X_IOPAD(0x0270, PIN_INPUT, 1) /* (D18) ECAP0_IN_APWM_OUT -> SYNC0_OUT */
                    >;
            };
    

    3) build the updated devicetree binary as documented in the Linux documentation, copy it into your filesystem, and see if you can observe a PPS signal on the J12 header.

    Regards,

    Nick

  • Thanks for reply! 

    I'm sorry but I don't use linux sdk, 

    My question is how to check 1pps signal of PTP in a PRP example of sdk 08.06.xx.

  • Hello,

    Can you please point us to the exact PRP example you are using in AM64x MCU+ SDK 8.6? I see https://software-dl.ti.com/mcu-plus-sdk/esd/AM64X/08_06_00_45/exports/docs/api_guide_am64x/ICSS_TIMESYNC.html , but I do not see any PRP examples documented for MCU+.

    I am sending your thread to another teammate to comment from the PRP side.

    Regards,

    Nick

  • Thanks

    I am using this example "mcu_plus_sdk_am64x_08_06_00_45\examples\industrial_comms\hsr_prp_demo\prp_mii"