<?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>Kinetis MicrocontrollersのトピックIEEE1588 Synchronized output reference clock with FRDM-K64F</title>
    <link>https://community.nxp.com/t5/Kinetis-Microcontrollers/IEEE1588-Synchronized-output-reference-clock-with-FRDM-K64F/m-p/420593#M24062</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello Everyone,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I need a synchronized reference clock up to 1MHz output from Kinetis K64 for my design, so my thinking is to use 1588 timer ENET_TCCR to create that clock and output to a GPIO.&amp;nbsp; To do that, it looks like I have to set the Timer Period Register ENET_ATPER to the 1/2 output clock period so my TCCR with output mode 0101 (Toggle Ouput on compare).&amp;nbsp; Here is what I tested on FRDM-K64F with output 1MHz reference clock at PTC16:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;PORT_HAL_SetMuxMode(PORTC,16u,kPortMuxAlt4);&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; // set timer output&lt;/P&gt;&lt;TABLE&gt;&lt;TBODY&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;P&gt;ENET_BWR_ATCR_RESTART(ENET, 0x201);&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; // set slave mode and start timer.&lt;/P&gt;&lt;P&gt;ENET_WR_ATPER(ENET, 500);&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; // set timer period 500nsec&lt;/P&gt;&lt;P&gt;ENET_WR_ATINC(ENET, 20);&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; // inc at 50MHz (with Ethernet RMII mode)&lt;/P&gt;&lt;P&gt;ENET_WR_TCCR(ENET, 0, 250);&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; // compare toggle at 250nsec&lt;/P&gt;&lt;P&gt;ENET_WR_TCSR(ENET, 0, (5&amp;lt;&amp;lt;2));&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; // set compare toggle output&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;My concerns are:&lt;/P&gt;&lt;P&gt;1. Is this the only way and/or correct way to create a output IEEE1588 synchronized reference clock?&lt;/P&gt;&lt;P&gt;2. Will PTP stack work properly with this fast ATPER period?&amp;nbsp; If not, what's the shortest period recommended? &lt;/P&gt;&lt;P&gt;3. Look like other 1588 timers with compare capture mode (triggered by external gpio) will be limited to ATPER period of 500nsec captured time which is not really useful!&amp;nbsp; Is there any other way to capture more realistic timer value, say in seconds.msec.usec.nsec using trigger from external event (GPIO)?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="line-height: 1.5;"&gt;I'm a first timer to IEEE1588, and I appreciate to all feedback and help.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="line-height: 1.5;"&gt;Thank you very much.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="line-height: 1.5;"&gt;Loc&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Tue, 29 Sep 2015 18:00:24 GMT</pubDate>
    <dc:creator>lpham</dc:creator>
    <dc:date>2015-09-29T18:00:24Z</dc:date>
    <item>
      <title>IEEE1588 Synchronized output reference clock with FRDM-K64F</title>
      <link>https://community.nxp.com/t5/Kinetis-Microcontrollers/IEEE1588-Synchronized-output-reference-clock-with-FRDM-K64F/m-p/420593#M24062</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello Everyone,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I need a synchronized reference clock up to 1MHz output from Kinetis K64 for my design, so my thinking is to use 1588 timer ENET_TCCR to create that clock and output to a GPIO.&amp;nbsp; To do that, it looks like I have to set the Timer Period Register ENET_ATPER to the 1/2 output clock period so my TCCR with output mode 0101 (Toggle Ouput on compare).&amp;nbsp; Here is what I tested on FRDM-K64F with output 1MHz reference clock at PTC16:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;PORT_HAL_SetMuxMode(PORTC,16u,kPortMuxAlt4);&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; // set timer output&lt;/P&gt;&lt;TABLE&gt;&lt;TBODY&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;P&gt;ENET_BWR_ATCR_RESTART(ENET, 0x201);&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; // set slave mode and start timer.&lt;/P&gt;&lt;P&gt;ENET_WR_ATPER(ENET, 500);&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; // set timer period 500nsec&lt;/P&gt;&lt;P&gt;ENET_WR_ATINC(ENET, 20);&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; // inc at 50MHz (with Ethernet RMII mode)&lt;/P&gt;&lt;P&gt;ENET_WR_TCCR(ENET, 0, 250);&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; // compare toggle at 250nsec&lt;/P&gt;&lt;P&gt;ENET_WR_TCSR(ENET, 0, (5&amp;lt;&amp;lt;2));&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; // set compare toggle output&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;My concerns are:&lt;/P&gt;&lt;P&gt;1. Is this the only way and/or correct way to create a output IEEE1588 synchronized reference clock?&lt;/P&gt;&lt;P&gt;2. Will PTP stack work properly with this fast ATPER period?&amp;nbsp; If not, what's the shortest period recommended? &lt;/P&gt;&lt;P&gt;3. Look like other 1588 timers with compare capture mode (triggered by external gpio) will be limited to ATPER period of 500nsec captured time which is not really useful!&amp;nbsp; Is there any other way to capture more realistic timer value, say in seconds.msec.usec.nsec using trigger from external event (GPIO)?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="line-height: 1.5;"&gt;I'm a first timer to IEEE1588, and I appreciate to all feedback and help.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="line-height: 1.5;"&gt;Thank you very much.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="line-height: 1.5;"&gt;Loc&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 29 Sep 2015 18:00:24 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Kinetis-Microcontrollers/IEEE1588-Synchronized-output-reference-clock-with-FRDM-K64F/m-p/420593#M24062</guid>
      <dc:creator>lpham</dc:creator>
      <dc:date>2015-09-29T18:00:24Z</dc:date>
    </item>
    <item>
      <title>Re: IEEE1588 Synchronized output reference clock with FRDM-K64F</title>
      <link>https://community.nxp.com/t5/Kinetis-Microcontrollers/IEEE1588-Synchronized-output-reference-clock-with-FRDM-K64F/m-p/420594#M24063</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;After reviewed and ran some tests with PTP, I found it is not possible to create this high frequency based on the synchronized system clock without issue.&amp;nbsp; While in operation, the PTP clock correction can be from tens of nanosecond to several microseconds depending on the nature of network connection, and that would overflow the TCCR value.&amp;nbsp; The alternative for me is to look into the synchronized 1PPS pulse output from IEEE1588 module&lt;SPAN style="line-height: 1.5;"&gt; to timestamp all timing activities.&amp;nbsp; Hope that helps for those having the same need as mine.&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 05 Oct 2015 22:40:01 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Kinetis-Microcontrollers/IEEE1588-Synchronized-output-reference-clock-with-FRDM-K64F/m-p/420594#M24063</guid>
      <dc:creator>lpham</dc:creator>
      <dc:date>2015-10-05T22:40:01Z</dc:date>
    </item>
  </channel>
</rss>

