<?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>topic Re: What clock does the K64F run at for determining flexcan timing? in Kinetis Software Development Kit</title>
    <link>https://community.nxp.com/t5/Kinetis-Software-Development-Kit/What-clock-does-the-K64F-run-at-for-determining-flexcan-timing/m-p/434720#M2647</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Sean,&lt;/P&gt;&lt;P&gt;Alice is correct that the default clocking of the Kinetis device is using FEI and therefore the core will operate at ~21.9xxxMHz or so.&lt;/P&gt;&lt;P&gt;But if you are running the KDS_3.0.0/KSDK_1.2.0 flexcan demo:&lt;/P&gt;&lt;P&gt;C:\Freescale\KSDK_1.2.0\examples\twrk64f120m\driver_examples\flexcan\flexcan_loopback\kds &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Then the clocking code is setting up the core to operate at 120MHz, the peripheral bus at 60MHz, external bus at 30MHz, and flash interface at 20MHz.&lt;/P&gt;&lt;P&gt;This is seen in the board.c BOARD_ClockInit() function that then calls the CLOCK_SYS_SetConfiguration() to set the clocks accordingly.&amp;nbsp; This function in fsl_clock_MK64F12.c .&lt;/P&gt;&lt;P&gt;If you set into that function call you will see the clock dividers set up as follows:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; /* Set outdiv for safe output clock frequency. */&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; CLOCK_HAL_SetOutDiv(SIM, 0U, 1U, 2U, 4U);&amp;nbsp; //DES 0=div by 1, 1=div by 2, 2=div by 3, 4=div by 5&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;FlexCAN module uses the peripheral bus that is clocked at 60MHz.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;David &lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Thu, 21 May 2015 19:54:14 GMT</pubDate>
    <dc:creator>DavidS</dc:creator>
    <dc:date>2015-05-21T19:54:14Z</dc:date>
    <item>
      <title>What clock does the K64F run at for determining flexcan timing?</title>
      <link>https://community.nxp.com/t5/Kinetis-Software-Development-Kit/What-clock-does-the-K64F-run-at-for-determining-flexcan-timing/m-p/434718#M2645</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello,&lt;/P&gt;&lt;P style="min-height: 8pt; padding: 0px;"&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I'm trying to implement Flexcan on a K64F board with a shield board we've created with a CAN chip on it. I had it working in MQX 4.1.1 with the kflexcan header, but the new peripheral driver seems a lot more barebones. For starters, there's no automated calculation of timing values based on an input baud rate, so I'm trying to figure out how to set it up.&lt;/P&gt;&lt;P style="min-height: 8pt; padding: 0px;"&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;There's an example in the TowerK64f board which should be very similar, but I see there it has timings for 48MHz and 60MHz but I don't know what a K64F is running by default.&lt;/P&gt;&lt;P style="min-height: 8pt; padding: 0px;"&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I'm on KDS 3.0 and KSDK 1.2. Not using processor expert of changing the clock timing specifically.&lt;/P&gt;&lt;P style="min-height: 8pt; padding: 0px;"&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Sean&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 14 May 2015 22:48:55 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Kinetis-Software-Development-Kit/What-clock-does-the-K64F-run-at-for-determining-flexcan-timing/m-p/434718#M2645</guid>
      <dc:creator>ironsean</dc:creator>
      <dc:date>2015-05-14T22:48:55Z</dc:date>
    </item>
    <item>
      <title>Re: What clock does the K64F run at for determining flexcan timing?</title>
      <link>https://community.nxp.com/t5/Kinetis-Software-Development-Kit/What-clock-does-the-K64F-run-at-for-determining-flexcan-timing/m-p/434719#M2646</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello Sean,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The default mcu clock mode is FEI, you can refer to here(from the K64 reference manual ) :&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper" image-alt="pastedImage_1.png"&gt;&lt;img src="https://community.nxp.com/t5/image/serverpage/image-id/36374i910BF4C765AF28EA/image-size/large?v=v2&amp;amp;px=999" role="button" title="pastedImage_1.png" alt="pastedImage_1.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;And the Flexcan clock , we can refer to here :&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper" image-alt="pastedImage_0.png"&gt;&lt;img src="https://community.nxp.com/t5/image/serverpage/image-id/22179i3E174D69A7B4D891/image-size/large?v=v2&amp;amp;px=999" role="button" title="pastedImage_0.png" alt="pastedImage_0.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper" image-alt="pastedImage_1.png"&gt;&lt;img src="https://community.nxp.com/t5/image/serverpage/image-id/22227i4B62061D95E0AEAC/image-size/large?v=v2&amp;amp;px=999" role="button" title="pastedImage_1.png" alt="pastedImage_1.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;then , about the "OSCERCLK" and "Bus clock" , please see here :&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper" image-alt="pastedImage_2.png"&gt;&lt;img src="https://community.nxp.com/t5/image/serverpage/image-id/22364iF2157520C1E8612C/image-size/large?v=v2&amp;amp;px=999" role="button" title="pastedImage_2.png" alt="pastedImage_2.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;Have a great day,&lt;BR /&gt;Alice&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;-----------------------------------------------------------------------------------------------------------------------&lt;BR /&gt;Note: If this post answers your question, please click the Correct Answer button. Thank you!&lt;BR /&gt;-----------------------------------------------------------------------------------------------------------------------&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 15 May 2015 09:50:51 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Kinetis-Software-Development-Kit/What-clock-does-the-K64F-run-at-for-determining-flexcan-timing/m-p/434719#M2646</guid>
      <dc:creator>Alice_Yang</dc:creator>
      <dc:date>2015-05-15T09:50:51Z</dc:date>
    </item>
    <item>
      <title>Re: What clock does the K64F run at for determining flexcan timing?</title>
      <link>https://community.nxp.com/t5/Kinetis-Software-Development-Kit/What-clock-does-the-K64F-run-at-for-determining-flexcan-timing/m-p/434720#M2647</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Sean,&lt;/P&gt;&lt;P&gt;Alice is correct that the default clocking of the Kinetis device is using FEI and therefore the core will operate at ~21.9xxxMHz or so.&lt;/P&gt;&lt;P&gt;But if you are running the KDS_3.0.0/KSDK_1.2.0 flexcan demo:&lt;/P&gt;&lt;P&gt;C:\Freescale\KSDK_1.2.0\examples\twrk64f120m\driver_examples\flexcan\flexcan_loopback\kds &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Then the clocking code is setting up the core to operate at 120MHz, the peripheral bus at 60MHz, external bus at 30MHz, and flash interface at 20MHz.&lt;/P&gt;&lt;P&gt;This is seen in the board.c BOARD_ClockInit() function that then calls the CLOCK_SYS_SetConfiguration() to set the clocks accordingly.&amp;nbsp; This function in fsl_clock_MK64F12.c .&lt;/P&gt;&lt;P&gt;If you set into that function call you will see the clock dividers set up as follows:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; /* Set outdiv for safe output clock frequency. */&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; CLOCK_HAL_SetOutDiv(SIM, 0U, 1U, 2U, 4U);&amp;nbsp; //DES 0=div by 1, 1=div by 2, 2=div by 3, 4=div by 5&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;FlexCAN module uses the peripheral bus that is clocked at 60MHz.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;David &lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 21 May 2015 19:54:14 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Kinetis-Software-Development-Kit/What-clock-does-the-K64F-run-at-for-determining-flexcan-timing/m-p/434720#M2647</guid>
      <dc:creator>DavidS</dc:creator>
      <dc:date>2015-05-21T19:54:14Z</dc:date>
    </item>
    <item>
      <title>Re: What clock does the K64F run at for determining flexcan timing?</title>
      <link>https://community.nxp.com/t5/Kinetis-Software-Development-Kit/What-clock-does-the-K64F-run-at-for-determining-flexcan-timing/m-p/434721#M2648</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thank you, that is fantastic information and helps me understand exactly what I need to know how this is set up, or set it up myself.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I also found that the MQX 4.2 release still has the kflexcan drivers which include auto-calculation of baud rates as an alternate option for anyone searching who finds this.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Sean&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 28 May 2015 20:31:01 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Kinetis-Software-Development-Kit/What-clock-does-the-K64F-run-at-for-determining-flexcan-timing/m-p/434721#M2648</guid>
      <dc:creator>ironsean</dc:creator>
      <dc:date>2015-05-28T20:31:01Z</dc:date>
    </item>
  </channel>
</rss>

