IMX8MM IEEE 1588 PTP output test

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

IMX8MM IEEE 1588 PTP output test

1,067 Views
Ben_Teng
Contributor I

Hello,

Currently I am working on IEEE 1588 PTP output verification, I observed that there's not a precise 1 pps when I enable pps. It should be 1pps Ideally in my perspective.  Would anyone help me figure this out? 

 

 

Many thanks

 

Here are my steps as below:

step 1. Configured the function pin:

MX8MM_IOMUXC_GPIO1_IO09_ENET1_1588_EVENT0_OUT   0x01

 

step 2.  Revised fec_ptp.c 

- val |= (FEC_HIGH_PULSE << FEC_T_TMODE_OFFSET);
+ //val |= (FEC_HIGH_PULSE << FEC_T_TMODE_OFFSET);
+ val |= (FEC_TMODE_TOGGLE << FEC_T_TMODE_OFFSET);

 

Step 3. replace kernel Image and dtb then reboot the system.

Step 4. enable pps

ptp4l -A -4 -H -m -i eth0 &

echo 1 > /sys/class/ptp/ptp0/pps_enable

Step 5. Use oscilloscope to check pps (Sorry I dont have the permission to upload image or attachments)

I observed the pps output waveform with Hi(2s) and Lo(2s) ( a.k.a the period is around 4s), I found there's a similar waveform in  i.MX IEEE1588 output test.pdf  page 6.

 

I'm using iMX8MM with linux kernel version 5.4.3, does anybody can help me figure this out please?

Thanks again. 

 

 

 

 

0 Kudos
Reply
4 Replies

972 Views
Rita_Wang
NXP TechSupport
NXP TechSupport
0 Kudos
Reply

962 Views
Ben_Teng
Contributor I

Hi @Rita_Wang ,

Thanks for your reply!

 

Now I can get 1 pps output yet duty cycle is 50%, is it possible to adjust DC% of 1 pps output by any chance?

 

Currently I'm using Linux Kernel version 5.4.3.

 

Thanks again!

 

Best Regards,

Ben

0 Kudos
Reply

996 Views
Ben_Teng
Contributor I

Hi

I can get 1 pps output now, and recently I'm trying to adjust duty cycle of each pulse.

 

e.g. Currently pps duty cycle = 50%, is it possible to adjust pulse width?

 

 

 

Best Regards,

Ben

0 Kudos
Reply

1,029 Views
Ben_Teng
Contributor I

Hello,

Here's the pps waveform, it is 4s per period approximately .

Could anybody guide me how to adjust the period to 1pps please? 

pps_waveformpps_waveform

0 Kudos
Reply