Hi everyone,
i have got 2 Slicekits, which are connected with a switch. The switch provides an AVB Masterclock to the Slicekits via Ethernet. I am trying to toogle LEDs on the Slicekits synchronously to the AVB Clock. The LEDs should change their statuses at the same time, but there is a delay of 40 - 80 ms between the Slicekits. It would be great if the delay wouldn´t be higher then 2 ms. I am using a modified version of the "app_simple_avb_demo" and this is the code i am using to toogle the LEDs. Maybe someone can tell me whats wrong.
P.S.:
Obviosly i am using an AVB-Switch, not a normal one.
while (1)
{
#pragma ordered
select
{
// toggle 4-bit LED array
case tmr when timerafter(end_time):> void:
{
led <: led_value;
led_value++;
end_time+=toggle;
}
break;
// Get requested time information
case ptp_get_requested_time_info_mod64(c_ptp, timeInfo):
{ tmr:>start_time;
time=timeInfo.ptp_ts_lo + ((unsigned long long) timeInfo.ptp_ts_hi << 32);
end_time= start_time+(toggle-((time/10) % toggle));
}
break;
// Request new time information from gptp server
case tmr2 when timerafter(t):>t:
{
ptp_request_time_info_mod64(c_ptp);
t += TIMEINFO_UPDATE_INTERVAL;
}
break;
}
}
avb timing issue
-
- Newbie
- Posts: 1
- Joined: Fri Feb 28, 2014 4:41 pm
-
- XCore Addict
- Posts: 158
- Joined: Thu Mar 20, 2014 8:04 am
Hi,I presume you are measuring the millisecond time delay using xscope prints instrumented at your code level.It will be interesting to know the time instances at which the two end points are making a request to gptp server. It is also worth to ensure there is no big delta between these end point requests which might also cause a different time sampling requests at server.There is also a test application available in XMOS git repository to validate GPTP. Please have a look at this if it helps.https://github.com/xcore/sw_avb/blob/ma ... rds,Srinie