UPGRADE YOUR BROWSER

We have detected your current browser version is not the latest one. Xilinx.com uses the latest web technologies to bring you the best online experience possible. Please upgrade to a Xilinx.com supported browser:Chrome, Firefox, Internet Explorer 11, Safari. Thank you!

cancel
Showing results for 
Search instead for 
Did you mean: 
Explorer
Explorer
718 Views
Registered: ‎12-20-2017

PTP problems on ZCU102

Jump to solution

I'm trying to get PTP working on a zcu102 using 2017.3 with a combination of vivado firmware and kernel configuration.  

 

On the software side I believe I have the kernel config and device tree stuff all working, and the only problem now is getting the firmware to output the correct bits.  I'm posting here because I know it's the firmware because I can create a "tutorial" project, export the HDF into my petalinux project, and PTP will work.

 

On the other hand, if I use our production firmware (bitstream and HDF), PTP stops working. (the ptp software outputs messages indicating that the PTP timestamps are always zero)

 

To debug our production firmware, I have sonme screenshots from the firmware developer's Vivado environment, showing that he followed https://www.xilinx.com/Attachment/GEM_TSU_Interface_Details_and_IEEE_1588_Support.pdf, opting for using the PS internal IOPLL as the GEM TSU clock. (of the three options for getting the GEM a clock, this seemed easiest).

 

We can confirm that our setup matches that shown in the guide: "GEM TSU clock" is unchecked in our high-speed peripheral I/O config.  However, PTP still shows timestamps of zero, implying the timestamp register is never incrementing

 

I would love some tips on how to debug this.  It appears we are doing something in the firmware to muck things up, but I am unclear how to proceed.  Thanks in advance.

 

IOConfig.jpg

 

PSPLConfig.png

0 Kudos
1 Solution

Accepted Solutions
Explorer
Explorer
653 Views
Registered: ‎12-20-2017

Re: PTP problems on ZCU102

Jump to solution

Somehow the vivado project had the GEM_TSU set to something other than the default - it was 100MHz instead of 250MHz.  When we tried to change it back to 250, the GUI accepted that, but if we looked closely at the actual clock frequency it was reporting, it was still 100MHz.

 

So we had to check the "Enable Manual Mode" box on the Clock Configuration -> Output Clocks .  Since this is called "manual mode", one would expect that this would require the designer to specify all of the multiply and divide factors for all of the PLLs.  Instead, the tool then calculates all of this automatically and sets everything to really give you 250MHz.

 

However...since the manual mode automatically changed some PLL settings, the clock coming out of the processor side into the PL side changes by a couple Hz (out of 100MHz).  You need to go into the VHDL and change some attributes to match, refresh the vhdl modules in Vivado, go back into the code and change one or two attributes back, refresh again, then you can build. 

 

Simple as mud, right?

 

0 Kudos
4 Replies
Explorer
Explorer
686 Views
Registered: ‎12-20-2017

Re: PTP problems on ZCU102

Jump to solution

Earlier versions of our firmware have working PTP, and later ones don't. 

I've looked at the HDF of working versions, and I'm pretty sure I can identify the C code in psu_init.c that would make PTP work for us.  Unfortunately, we can't figure out how to modify the project to get it to add this C code back into the project - to psu_init.c

 

The code snippet that is present in the working-ptp versions, but absent in the non-working-ptp versions, is one that sets the CRL_APB.GEM_TSU_REF_CTRL register and enables the clock in psu_init.c.

 

We believe we have everything in the project as it should be, but obviously we've missed something. Can anyone offer any advice?

Also, I would like to be able to view this PSU register from vivado to confirm my suspicion.  However, none of the registers offered by vivado's hardware manager display any of these register names. 

Would it help that I know the address is 0xFF5E0100?

0 Kudos
Explorer
Explorer
675 Views
Registered: ‎12-20-2017

Re: PTP problems on ZCU102

Jump to solution

We finally solved our problem. It was something in the settings for the GEM_TSU in the output clocks.

 

0 Kudos
Moderator
Moderator
663 Views
Registered: ‎07-31-2012

Re: PTP problems on ZCU102

Jump to solution

Hi @aaron_b1,

 

Could you please elaborate on how did you resolve to help other if they see similar issue?

Later, please close this thread by accepted solution.

 

Regards

Praveen


-------------------------------------------------------------------------
Don’t forget to reply, kudo, and accept as solution.
-------------------------------------------------------------------------
0 Kudos
Explorer
Explorer
654 Views
Registered: ‎12-20-2017

Re: PTP problems on ZCU102

Jump to solution

Somehow the vivado project had the GEM_TSU set to something other than the default - it was 100MHz instead of 250MHz.  When we tried to change it back to 250, the GUI accepted that, but if we looked closely at the actual clock frequency it was reporting, it was still 100MHz.

 

So we had to check the "Enable Manual Mode" box on the Clock Configuration -> Output Clocks .  Since this is called "manual mode", one would expect that this would require the designer to specify all of the multiply and divide factors for all of the PLLs.  Instead, the tool then calculates all of this automatically and sets everything to really give you 250MHz.

 

However...since the manual mode automatically changed some PLL settings, the clock coming out of the processor side into the PL side changes by a couple Hz (out of 100MHz).  You need to go into the VHDL and change some attributes to match, refresh the vhdl modules in Vivado, go back into the code and change one or two attributes back, refresh again, then you can build. 

 

Simple as mud, right?

 

0 Kudos