Re: [Linuxptp-users] recvmsg tx timestamp failed: Resource temporarily unavailable
PTP IEEE 1588 stack for Linux
Brought to you by:
rcochran
From: Rayagond K. <ray...@gm...> - 2013-02-09 12:52:58
|
On 9 February 2013 17:21, Richard Cochran <ric...@gm...> wrote: > On Sat, Feb 09, 2013 at 04:13:08PM +0530, Rayagond Kokatanur wrote: > > > > What is max_adj value ? Is it a maximum clock frequency connect to my > > MAC/PTP ? > > No. > > It is maximum adjustment (in parts per billion) tolerated by your > clock. If your clock can accept an adjustment 0.1%, then max_adj > will be 1000000. > okay, I will check with HW team and assign correct value. > > > Whenever ptp4l calls .adjfreq, it passes either +/1 .max_adj frequency to > > .adjfreq api, why ? > > Because the servo is trying to steer the clock at the maximum possible > rate. Probably your time stamps are messed up. > So once SLAVE sync to MASTER then ptp stack should not call .adjfreq api right, unless there is change in MASTER time. > > 2> DEFAULT_ADDEND = 0xF0000029 > > > > What is this magic number ? > > The ixp featues a frequency compenstated clock, with input clock at > 66 MHz. Every input clock, the addend is accumulated into a 32 bit > register. When that register overflows, it produces one clock tick at > the nominal frequency of 62.5 MHz. Changing the addend makes the clock > go faster or slower. > But how 0xF0000029 value wrt 66MHz clock ? In our device the way driver need to update the ADDEND registers is same as ixp device ie (2^32)/freq_ratio, where freq_ratio = ptp_clock_freq/50000000. So in my case ptp clock freq or system clock freq is 62.5MHz, so DEFAULT value i am taking is = ((2^32) * 50000000)/62500000 = 0xCCCCCC. Is my default addend value correct ? > > Is it calculated based on max_adj frequency > > value ? > > No, it is the other way round. > > HTH, > Richard > Thanks and Regards Rayagond |