I have zynqmp based board and we use it as ptp slave. When I run phc_ctl /dev/ptp0 caps, where /dev/ptp0 is macb/gem0 ptp, I get 64000000, which is hardcoded in the following function.
static s32 gem_get_ptp_max_adj(void)
{
return 64000000;
}
and when I call like this, I get frequency = 6892.211
double f = 0.0;
struct timex tx;
memset(&tx, 0, sizeof(tx));
if (ClockAdjtime(tx) >= 0) {
f = tx.freq / 65.536;
}
Can anyone tell me how these 6892.211 and 64000000 are derived?
Question
kmudide
Hi All,
I have zynqmp based board and we use it as ptp slave. When I run phc_ctl /dev/ptp0 caps, where /dev/ptp0 is macb/gem0 ptp, I get 64000000, which is hardcoded in the following function.
static s32 gem_get_ptp_max_adj(void)
{
return 64000000;
}
and when I call like this, I get frequency = 6892.211
double f = 0.0;
struct timex tx;
memset(&tx, 0, sizeof(tx));
if (ClockAdjtime(tx) >= 0) {
f = tx.freq / 65.536;
}
Can anyone tell me how these 6892.211 and 64000000 are derived?
0 answers to this question
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now