SDK:
SDK_2.10.1_MIMXRT1170-EVK
board:
MIMXRT1176DVMAA
Driver:
fsl_enet.c
api:
ENET_Ptp1588SetTimer
I start a 1s timer. The FreeRTOS system time acquisition is accurate, but the PTP time acquisition is inaccurate.
PTP time has 20 millisecond error.
[Timer] sys_time 102002000000, ptp_time 100313219076 ␊
[Timer] sys_time 103002000000, ptp_time 101296477960 ␊
[Timer] sys_time 104002000000, ptp_time 102279757098 ␊
[Timer] sys_time 105002000000, ptp_time 103394836640 ␊
[Timer] sys_time 106002000000, ptp_time 104246329027 ␊
[Timer] sys_time 107002000000, ptp_time 105229594061 ␊
[Timer] sys_time 108002000000, ptp_time 106212862170 ␊
Hi,
Is there any way to prove that PTP timer/ENET_Ptp1588GetTimer is accurate? not pps is accurate.
Hi @wangbaozeng90 ,
About the ptp timer correct, just as I told you, I use the compare to toggle the pin, then use the oscilloscope to test the pin wave, it can demonstrate the correct or not.
ENET_Ptp1588GetTimer, about your test method, I think each time,before you call:
Best Regards,
Kerry
Hi @wangbaozeng90 ,
Thanks for your interest in the NXP MIMXRT product, I would like to provide service for you.
I think it is related to the testing method, I don't know which detail data you output, seems the timer counter.
When you test the ptp_time, make sure it is not interrupted by other higher interrupt, then it will influence the test result.
In the previous time, I even can use the IEEE 1588 output 1us pulse.
So, I think you also can use the timer compare output to test it.
Wish it helps you!
Best Regards,
Kerry
Hi,
The ptptime interval is not accurate - not 1 second.
Example:
evkmimxrt1170_enet_txrx_ptp1588_transfer_cm7
Log:
ENET PTP 1588 example start.␍␊
Wait for PHY init...␍␊
Wait for PHY link up...␍␊
0 second, 27716 nanosecond ␍␊
0 second, 987503655 nanosecond ␍␊
1 second, 974939209 nanosecond ␍␊
2 second, 962420888 nanosecond ␍␊
3 second, 949911300 nanosecond ␍␊
Code: