IEEE 1588 TimeStamp

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

IEEE 1588 TimeStamp

1,395 Views
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

Labels (1)
Tags (3)
3 Replies

911 Views
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)!


911 Views
igorshakirov
Contributor II

Thank you.

0 Kudos

911 Views
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 Kudos