1pps signal in IEEE1588 interface in LS1021A

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

1pps signal in IEEE1588 interface in LS1021A

2,274 Views
sacharya
Contributor I

Hi,

Problem Statement - Need to generate 1pps

Background -

I am using TWR-LS1021A; using the sources from linux-5.10 (git checkout -b linux-5.10 origin/linux-5.10)

I saw the dtsi files and looks like the fiper1 and fiper2 are programmed correctly. This is in the codebase I have below.

ptp_clock@2d10e00 {

                        compatible = "fsl,etsec-ptp";

                        reg = <0x0 0x2d10e00 0x0 0xb0>;

                        interrupts = <GIC_SPI 173 IRQ_TYPE_LEVEL_HIGH>;

                        fsl,tclk-period = <5>;

                        fsl,tmr-prsc    = <2>;

                        fsl,tmr-add     = <0xaaaaaaab>;

                        fsl,tmr-fiper1  = <999999995>;

                        fsl,tmr-fiper2  = <999999995>;

                        fsl,max-adj     = <499999999>;

                        fsl,extts-fifo;

                };

I have checked the code and the FIPER is programmed in the codebase correctly.

The TMR_FIPER register, to generate a 1 PPS event, the value (10^9 nanoseconds) - TCLK_PERIOD is programmed. That means 999999995 since TCLK_PERIOD is 5.

So I should be getting 1PPS in the below J16

J16 is the header where - IEEE-1588 signals are terminated, Circled in orange.

image (2).pngimage (3).png

From the image of the PCB here above, the numbering is clear in J16. But in J16, I am not sure where the IEEE-1588 signals are terminated ( which signal  in which pin), is not clear in the 1588-Interface diagram above.

I tried to check in all the pins TSEC_1588_PULSE_OUT1 or TSEC_1588_PULSE_OUT2 - I am not getting any thing. Do I need to do any other settings in the code or hardware to get this 1PPS?

 

0 Kudos
Reply
11 Replies

2,252 Views
sacharya
Contributor I

Thank You very much. I really appreciate.

I am requesting for two more help 

1.  00000030: 00080000 881b7340 00000000 00000000  ====== 1000 1000 0001

Did you mean these three bits?

2.

How to modify these RCWs? Can you please point me to any explanation on how to do this?

 

0 Kudos
Reply

2,248 Views
ufedor
NXP Employee
NXP Employee

TWR-LS1021A RCW sources for SerDes protocol 0x30 (currently used) are present in the repository:

https://source.codeaurora.org/external/qoriq/qoriq-components/rcw/tree/ls1021atwr/SSR_PNS_30?h=LSDK-...

To configure EC3 it is required to add the following line:

EC3=2

 

Further reference: Layerscape Software Development Kit User Guide, 4.3.4 How to generate LSDK composite firmware and 4.3.5 How to build TF-A with RCW and U-Boot/UEFI.

0 Kudos
Reply

2,193 Views
sacharya
Contributor I

Hi, I have not done any modification to the RCW files and I haven't built Uboot yet. I have shared the UBoot log before. Attached again. With the existing RCW, I wanted to know what other mechanisms can be used to generate 1pps? I am thinking to toggle the GPIO line to generate 1 pulse per second.

To do that one more help needed - How to interpret the Reset Configuration Word (RCW): in the Uboot log for GPIO proramming?

Thank you in advance.

 

 

0 Kudos
Reply

2,198 Views
sacharya
Contributor I

There are multiple .rcw files here in this link. And I have not understood, where i need to add this line. Please explian this in detail. I am new to this board and the configurations. Please help me.

0 Kudos
Reply

2,184 Views
ufedor
NXP Employee
NXP Employee

Please read the Layerscape Software Development Kit User Guide, 4.3.4 How to generate LSDK composite firmware and 4.3.5 How to build TF-A with RCW and U-Boot/UEFI.

Default NOR boot RCW is "rcw_1200.rcw":

https://source.codeaurora.org/external/qoriq/qoriq-components/rcw/tree/ls1021atwr/SSR_PNS_30/rcw_120...

 

0 Kudos
Reply

2,229 Views
sacharya
Contributor I

Thank you again. Can I use the mm or mw uboot commands to change the RCW from the uboot prompt before booting Linux boots up?

0 Kudos
Reply

2,262 Views
ufedor
NXP Employee
NXP Employee

Please provide U-Boot booting log as text file to check that LS1021A EC3 is correctly multiplexed for IEEE1588 signals - refer to the QorIQ LS1021A Reference Manual, 3.4.11 Ethernet controller 3, GPIO3, GPIO4, eTSEC, USB2, and FTM3 signal multiplexing.

0 Kudos
Reply

2,258 Views
sacharya
Contributor I

Please find the uboot log

0 Kudos
Reply

2,254 Views
ufedor
NXP Employee
NXP Employee

In the provided log RCW[EC3]=0b000 (RGMII3), but for IEEE1588 it has to be 0b010.

0 Kudos
Reply

2,118 Views
sacharya
Contributor I

Hi,

Once UBoot is build with EC3=2 and installed, I should be able to see the 1588 signal in the connector. Is that correct? Do we need any specific application or utility to get the 1pps signal in that connector?

Is there a way to change the wodth of the 1pps pulse?

Thank You

0 Kudos
Reply

2,109 Views
ufedor
NXP Employee
NXP Employee

Please refer to the Layerscape Software Development Kit User Guide, Rev. 21.08, 8.7.7.1 PPS signal.

0 Kudos
Reply