IEEE 1588 TimeStamp

取消
显示结果 
显示  仅  | 搜索替代 
您的意思是: 

IEEE 1588 TimeStamp

2,451 次查看
christophegraul
Contributor II

Hi,

is there anyone that wrote some code about initializing a K60 to have Ethernet frames timestamping ?

I do have an issue with the TimeStamp exceeding 10^9 ns which is not conform to the specs.

Any clues would be appreciated.

Christophe

标签 (1)
标记 (3)
3 回复数

1,967 次查看
PaoloRenzo
Contributor V

Hope this helps:

  SIM_SOPT2 &= ~SIM_SOPT2_TIMESRC(3);//clear

  SIM_SOPT2 |= SIM_SOPT2_TIMESRC(1); //PLL clk

  // Program INC and Period Regiser

  ENET_ATPER  /*(mac_sel)*/ = 0x3B9ACA00;  //10^9

  //Using PLL/FLL clock

  ENET_ATINC/*(0)*/ = ENET_ATINC_INC(10) | ENET_ATINC_INC_CORR(10);//100MHz


  // Enable Timer

  ENET_ATCR/*(mac_sel)*/ = ENET_ATCR_EN_MASK;

Do not forget to set into Enhanced Buffer Mode (not legacy)!


1,967 次查看
igorshakirov
Contributor II

Thank you.

0 项奖励
回复

1,967 次查看
christophegraul
Contributor II

Hi Paolo,

yes it helped thank you. Your code and correction of some mistakes I did solved the issue. Thank you

0 项奖励
回复