<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>LPC MicrocontrollersのトピックRe: LPC54606 ENET 1588 timer</title>
    <link>https://community.nxp.com/t5/LPC-Microcontrollers/LPC54606-ENET-1588-timer/m-p/950383#M37766</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P style="color: #51626f; background-color: #ffffff; border: 0px;"&gt;&lt;SPAN style="border: 0px; font-weight: inherit;"&gt;Hi&amp;nbsp;&lt;SPAN style="background-color: #ffffff;"&gt;Soledad&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="color: #51626f; background-color: #ffffff; border: 0px;"&gt;&lt;SPAN style="border: 0px; font-weight: inherit;"&gt;&amp;nbsp; &amp;nbsp;thanks for helping.&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="color: #51626f; background-color: #ffffff; border: 0px;"&gt;&lt;SPAN style="border: 0px; font-weight: inherit;"&gt;&amp;nbsp; &amp;nbsp;Still questions, What if&amp;nbsp;&lt;SPAN style="background-color: #ffffff;"&gt;FreqCompensationValue_n = FreqScaleFactor_n * FreqCompensationValue_n_1 &amp;gt;0xFFFF FFFF?&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="color: #51626f; background-color: #ffffff; border: 0px;"&gt;&lt;SPAN style="border: 0px; font-weight: inherit;"&gt;I&amp;nbsp; found that&amp;nbsp;if&amp;nbsp;FreqScaleFactor_n&amp;nbsp;&amp;gt;1(slave clk needs to run faster?) and FreqCompensationValue_n_1 nearly reach&amp;nbsp; 0xffff ffff, take&amp;nbsp;FreqScaleFactor_n&amp;nbsp;=&amp;nbsp;1.045412 and &lt;SPAN style="background-color: #ffffff;"&gt;FreqCompensationValue_n_1 = 0xffff ff00&amp;nbsp;&lt;/SPAN&gt;or example,&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="color: #51626f; background-color: #ffffff; border: 0px;"&gt;&lt;SPAN style="border: 0px; font-weight: inherit; "&gt;FreqCompensationValue_n = 1.045412* FreqCompensationValue_n_1 =&amp;nbsp;1.045412*0xffff ff00 = 0xffff ffff,&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="color: #51626f; background-color: #ffffff; border: 0px;"&gt;&lt;SPAN style="border: 0px; font-weight: inherit; "&gt;that means addend register is not adjusted. The sub second increment register is set to 43, should I increase this value to 44 so that the slave clk runs faster? if so that value should set to addend register?&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Tue, 08 Oct 2019 00:42:33 GMT</pubDate>
    <dc:creator>topkinschen</dc:creator>
    <dc:date>2019-10-08T00:42:33Z</dc:date>
    <item>
      <title>LPC54606 ENET 1588 timer</title>
      <link>https://community.nxp.com/t5/LPC-Microcontrollers/LPC54606-ENET-1588-timer/m-p/950380#M37763</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp; Please Help.&amp;nbsp; &amp;nbsp;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;1 In fine correction method,&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;ENET 1588 timer should run under 50MHz CLK, thus 50MHz*43ns = 0x7fff fff made the nanosecond register reach to&amp;nbsp;0x7fff fff&amp;nbsp; every second , but this CLK may drift to other frequency so we have to adjust addend register to adjust the frequency ,under which 43ns was add to system timer, if the frequency drift to 66MHz so we make addend register to 2^32/1.32 , thus 43ns was added to nanosecond every 1.32 66MHz clk , make result as under 50MHz CLK, is my understanding right?&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;2 On page 864 of manual, described ref clk drifted to 65MHz,66MHz,67MHz, what if the ref CLK drift to 45MHz, then 45/50=0.9, addend value should = 2^32/0.9? but this overflows,&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;here is my test data time offset between slave and master:slaveSyncTime - masterSyncTime&lt;/P&gt;&lt;P&gt;offsetFromMaster sec:0,nanoSec:-72095363&amp;nbsp;&lt;/P&gt;&lt;P&gt;offsetFromMaster sec:0,nanoSec:-94197161&lt;/P&gt;&lt;P&gt;offsetFromMaster sec:0,nanoSec:-116387462&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;if offset&amp;lt;0 means ,&amp;nbsp;&lt;SPAN&gt;slave needs to run faster, we have to make addend register value bigger, what if addend register value is already 0xffff ffff?&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;3 I use the addend value adjustment&amp;nbsp;algorithm&amp;nbsp;on page 865,but slave clk offset to master clk hop, the offset may be -200ms, 125us,11ms. -28ms 140us.. ... offser not stable, slave clk not locked to master&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;bellow is my way, please correct me&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;FreqCompensationValue_0 = 0xffff ffff&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;MasterClockTime_n_1: timestamp got in last followUp msg&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;MasterClockTime_n: timestamp got in current followUp msg&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;SlaveClockTimen_n_1&amp;nbsp;:timestamp got when last sync msg &lt;SPAN&gt;arrived&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;SlaveClockTimen_n&lt;SPAN&gt;&amp;nbsp;:timestamp got when current sync msg arrive&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;MasterClockCount_n = MasterClockTime_n - MasterClockTime_n_1&amp;nbsp; &amp;nbsp; (MasterClockCount_n&amp;nbsp; int32 with unit of nanosecond)&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;SlaveClockCount_n = SlaveClockTimen_n - SlaveClockTime_n_1&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;nbsp;(SlaveClockCount_n&amp;nbsp; &amp;nbsp; int32&amp;nbsp;&lt;SPAN&gt;with unit&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;SPAN&gt;of nanosecond)&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;&lt;SPAN&gt;FreqScaleFactor_n= (MasterClockCount_n + MasterClockCount_n&amp;nbsp; -&amp;nbsp;SlaveClockCount_n&amp;nbsp; )*1.0/SlaveClockCount_n&amp;nbsp;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;&lt;SPAN&gt;FreqCompensationValue_n = FreqScaleFactor_n * FreqCompensationValue_n_1&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;&lt;SPAN&gt;I set FreqCompensationValue_0 = 0xffff ffff, but&amp;nbsp;I found that&amp;nbsp;if&amp;nbsp;&lt;SPAN&gt;FreqScaleFactor_n&lt;/SPAN&gt;&amp;nbsp;&amp;gt;1(slave needs to run faster?) and FreqCompensationValue_n_1 = 0xffff ffff, take&amp;nbsp;FreqScaleFactor_n&lt;SPAN&gt;&amp;nbsp;=&amp;nbsp;1.045412 for example,&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;&lt;SPAN&gt;FreqCompensationValue_1 = 1.045412* FreqCompensationValue_0 =&amp;nbsp;1.045412*0xffff ffff = 0xffff ffff,&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;&lt;SPAN&gt;that means addend register is not adjusted.&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;&lt;SPAN&gt;where is the wrong understanding?&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 20 Sep 2019 00:56:10 GMT</pubDate>
      <guid>https://community.nxp.com/t5/LPC-Microcontrollers/LPC54606-ENET-1588-timer/m-p/950380#M37763</guid>
      <dc:creator>topkinschen</dc:creator>
      <dc:date>2019-09-20T00:56:10Z</dc:date>
    </item>
    <item>
      <title>Re: LPC54606 ENET 1588 timer</title>
      <link>https://community.nxp.com/t5/LPC-Microcontrollers/LPC54606-ENET-1588-timer/m-p/950381#M37764</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;could someone help on this, thanks.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 30 Sep 2019 02:41:00 GMT</pubDate>
      <guid>https://community.nxp.com/t5/LPC-Microcontrollers/LPC54606-ENET-1588-timer/m-p/950381#M37764</guid>
      <dc:creator>topkinschen</dc:creator>
      <dc:date>2019-09-30T02:41:00Z</dc:date>
    </item>
    <item>
      <title>Re: LPC54606 ENET 1588 timer</title>
      <link>https://community.nxp.com/t5/LPC-Microcontrollers/LPC54606-ENET-1588-timer/m-p/950382#M37765</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Your understandings are correct and you are doing exactly the way it is supposed to be done, but if you are having a drift in the clock of so much not keeping the drift in&amp;nbsp; +- 1MHZ then, the issue it is your HW clock that provides the signal, this should be stable enough to maintain the device working fine.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Even without 1588 this would be an issue,&amp;nbsp; &amp;nbsp;for the Ethernet protocol, like the auto-negotiation, etc.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Have a nice day,&amp;nbsp;&lt;/P&gt;&lt;P&gt;Regards&amp;nbsp;&lt;/P&gt;&lt;P&gt;Soledad&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 30 Sep 2019 17:28:28 GMT</pubDate>
      <guid>https://community.nxp.com/t5/LPC-Microcontrollers/LPC54606-ENET-1588-timer/m-p/950382#M37765</guid>
      <dc:creator>soledad</dc:creator>
      <dc:date>2019-09-30T17:28:28Z</dc:date>
    </item>
    <item>
      <title>Re: LPC54606 ENET 1588 timer</title>
      <link>https://community.nxp.com/t5/LPC-Microcontrollers/LPC54606-ENET-1588-timer/m-p/950383#M37766</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P style="color: #51626f; background-color: #ffffff; border: 0px;"&gt;&lt;SPAN style="border: 0px; font-weight: inherit;"&gt;Hi&amp;nbsp;&lt;SPAN style="background-color: #ffffff;"&gt;Soledad&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="color: #51626f; background-color: #ffffff; border: 0px;"&gt;&lt;SPAN style="border: 0px; font-weight: inherit;"&gt;&amp;nbsp; &amp;nbsp;thanks for helping.&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="color: #51626f; background-color: #ffffff; border: 0px;"&gt;&lt;SPAN style="border: 0px; font-weight: inherit;"&gt;&amp;nbsp; &amp;nbsp;Still questions, What if&amp;nbsp;&lt;SPAN style="background-color: #ffffff;"&gt;FreqCompensationValue_n = FreqScaleFactor_n * FreqCompensationValue_n_1 &amp;gt;0xFFFF FFFF?&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="color: #51626f; background-color: #ffffff; border: 0px;"&gt;&lt;SPAN style="border: 0px; font-weight: inherit;"&gt;I&amp;nbsp; found that&amp;nbsp;if&amp;nbsp;FreqScaleFactor_n&amp;nbsp;&amp;gt;1(slave clk needs to run faster?) and FreqCompensationValue_n_1 nearly reach&amp;nbsp; 0xffff ffff, take&amp;nbsp;FreqScaleFactor_n&amp;nbsp;=&amp;nbsp;1.045412 and &lt;SPAN style="background-color: #ffffff;"&gt;FreqCompensationValue_n_1 = 0xffff ff00&amp;nbsp;&lt;/SPAN&gt;or example,&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="color: #51626f; background-color: #ffffff; border: 0px;"&gt;&lt;SPAN style="border: 0px; font-weight: inherit; "&gt;FreqCompensationValue_n = 1.045412* FreqCompensationValue_n_1 =&amp;nbsp;1.045412*0xffff ff00 = 0xffff ffff,&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="color: #51626f; background-color: #ffffff; border: 0px;"&gt;&lt;SPAN style="border: 0px; font-weight: inherit; "&gt;that means addend register is not adjusted. The sub second increment register is set to 43, should I increase this value to 44 so that the slave clk runs faster? if so that value should set to addend register?&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 08 Oct 2019 00:42:33 GMT</pubDate>
      <guid>https://community.nxp.com/t5/LPC-Microcontrollers/LPC54606-ENET-1588-timer/m-p/950383#M37766</guid>
      <dc:creator>topkinschen</dc:creator>
      <dc:date>2019-10-08T00:42:33Z</dc:date>
    </item>
    <item>
      <title>Re: LPC54606 ENET 1588 timer</title>
      <link>https://community.nxp.com/t5/LPC-Microcontrollers/LPC54606-ENET-1588-timer/m-p/950384#M37767</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello Liang,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Have you tried to use the API in the SDK for the LPC546xx.&amp;nbsp;&lt;/P&gt;&lt;P&gt;For the 1588_Enet Example there is a function utilized inside that corrects the timer, both adding or subtracting, whatever is necessary.&lt;/P&gt;&lt;P&gt;This function uses the coarse method, which essentially tries to correct it in one cycle, but due to a variety of factors it can take several clock cycles to correct. The function is called&amp;nbsp;&lt;STRONG&gt;ENET_Ptp1588CorrectTimerInCoarse.&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;The description you have stated in your above posts are to implement the coarse method. It is not actually changing the frequency of the clock. Instead you are calculating and offset value to sync the time, which is added or subtracted from the system time.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;In other words, the master clock periodically sends a Sync message based on its local clock to a slave clock. It marks the exact time the Sync message is sent, and a Follow_Up message with the exact time information is immediately sent to the slave clock. The slave clock time stamps the arrival of the Sync message, compares the arrival time to the departure time provided in the Follow_Up and is then able to identify the amount of latency in the operating system and adjust its clock accordingly.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Let me know if this helps.&lt;/P&gt;&lt;P&gt;Best Regards,&lt;/P&gt;&lt;P&gt;Sabina&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 10 Oct 2019 04:12:02 GMT</pubDate>
      <guid>https://community.nxp.com/t5/LPC-Microcontrollers/LPC54606-ENET-1588-timer/m-p/950384#M37767</guid>
      <dc:creator>Sabina_Bruce</dc:creator>
      <dc:date>2019-10-10T04:12:02Z</dc:date>
    </item>
    <item>
      <title>Re: LPC54606 ENET 1588 timer</title>
      <link>https://community.nxp.com/t5/LPC-Microcontrollers/LPC54606-ENET-1588-timer/m-p/950385#M37768</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi&amp;nbsp;&amp;nbsp;&lt;SPAN style="color: #51626f; background-color: #ffffff;"&gt;Sabina&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp; &amp;nbsp; thanks for helping.&lt;/P&gt;&lt;P&gt;&amp;nbsp; &amp;nbsp;&amp;nbsp;ENET_Ptp1588CorrectTimerInCoarse may cause system time jitters.&lt;/P&gt;&lt;P&gt;&amp;nbsp; &amp;nbsp; So I want to use&amp;nbsp;ENET_Ptp1588CorrectTimerInFine to adjust system time smoothly.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 10 Oct 2019 04:51:54 GMT</pubDate>
      <guid>https://community.nxp.com/t5/LPC-Microcontrollers/LPC54606-ENET-1588-timer/m-p/950385#M37768</guid>
      <dc:creator>topkinschen</dc:creator>
      <dc:date>2019-10-10T04:51:54Z</dc:date>
    </item>
  </channel>
</rss>

