<?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: Using the New Clocks Tool to configure a custom K24F board with a 32 MHz external crystal. in Kinetis Software Development Kit</title>
    <link>https://community.nxp.com/t5/Kinetis-Software-Development-Kit/Using-the-New-Clocks-Tool-to-configure-a-custom-K24F-board-with/m-p/614004#M6381</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello&amp;nbsp; again Jonathan,&lt;/P&gt;&lt;P&gt;OK, I was able to eliminate the ARM core LOCKUP event by reducing the clock frequencies. In particular, I changed the PRDIV value from 8 to 16 resulting in the system clock going from 96 MHz to 48MHz. However, I still don't understand why the higher frequency clocks would result in a LOCKUP event since it's within the specs of the MCU. Any insights from anyone on this would be appreciated. Otherwise I'll continue on my merry way for the time being. Thank you. Peter&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Fri, 18 Nov 2016 21:35:42 GMT</pubDate>
    <dc:creator>peterfurey</dc:creator>
    <dc:date>2016-11-18T21:35:42Z</dc:date>
    <item>
      <title>Using the New Clocks Tool to configure a custom K24F board with a 32 MHz external crystal.</title>
      <link>https://community.nxp.com/t5/Kinetis-Software-Development-Kit/Using-the-New-Clocks-Tool-to-configure-a-custom-K24F-board-with/m-p/613999#M6376</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello,&lt;/P&gt;&lt;P&gt;I'm trying to configure a custom K24F based&amp;nbsp;board with a 32 MHz external crystal using the new clock configuration tool (KExTools v2.0). I'm using KDS v3.2&amp;nbsp;with KSDK v2.0 and I can get a useable configuration using the FEI mode&amp;nbsp;but I&amp;nbsp;want to use the external crystal. I'm currently trying the attached configuration.&amp;nbsp;The crystal is attached to the board using&amp;nbsp;Connection type 1 (Figure 26-2&amp;nbsp;from K24P144M120SF5RM.pdf).&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper" image-alt="166839_166839.PNG"&gt;&lt;img src="https://community.nxp.com/t5/image/serverpage/image-id/122432iD6A5F3872E219502/image-size/large?v=v2&amp;amp;px=999" role="button" title="166839_166839.PNG" alt="166839_166839.PNG" /&gt;&lt;/span&gt;&lt;span class="lia-inline-image-display-wrapper" image-alt="connection1.PNG"&gt;&lt;img src="https://community.nxp.com/t5/image/serverpage/image-id/6590iB322861F1D43E45A/image-size/large?v=v2&amp;amp;px=999" role="button" title="connection1.PNG" alt="connection1.PNG" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;All of the relevant register settings look like I would expect them to be, however, when I try to run with this configuration the application hangs in fsl_clock.c: CLOCK_SetExternalRefClkConfig() at&lt;/P&gt;&lt;P style="min-height: 8pt; padding: 0px;"&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper" image-alt="166840_166840.PNG"&gt;&lt;img src="https://community.nxp.com/t5/image/serverpage/image-id/122433i4D9213E51D89C377/image-size/large?v=v2&amp;amp;px=999" role="button" title="166840_166840.PNG" alt="166840_166840.PNG" /&gt;&lt;/span&gt;&lt;span class="lia-inline-image-display-wrapper" image-alt="clkCode.PNG"&gt;&lt;img src="https://community.nxp.com/t5/image/serverpage/image-id/6627i1FF968E064440E67/image-size/large?v=v2&amp;amp;px=999" role="button" title="clkCode.PNG" alt="clkCode.PNG" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;Waiting for the OSCINIT0 bit to get set. When I put a probe on EXTAL0 and XTAL0 I see no activity, both low. We also tried swapping out the 32MHz crystal with a 8MHz crystal&amp;nbsp;(and different connection types) and&amp;nbsp;got the same results. I've also tried all of the other external MCG modes with no luck either. The crystal we're using is ECX-53B SMD Quartz Crystal, part number ECS-320-8-30B.&amp;nbsp; Any suggestions on what else to try or ideas on what the problem might be?&lt;/P&gt;&lt;P style="min-height: 8pt; padding: 0px;"&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Much thanks,&lt;/P&gt;&lt;P&gt;Peter&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 28 Oct 2016 21:06:24 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Kinetis-Software-Development-Kit/Using-the-New-Clocks-Tool-to-configure-a-custom-K24F-board-with/m-p/613999#M6376</guid>
      <dc:creator>peterfurey</dc:creator>
      <dc:date>2016-10-28T21:06:24Z</dc:date>
    </item>
    <item>
      <title>Re: Using the New Clocks Tool to configure a custom K24F board with a 32 MHz external crystal.</title>
      <link>https://community.nxp.com/t5/Kinetis-Software-Development-Kit/Using-the-New-Clocks-Tool-to-configure-a-custom-K24F-board-with/m-p/614000#M6377</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Dear &lt;A class="jx-jive-macro-user" href="https://community.nxp.com/people/peterfurey"&gt;peterfurey&lt;/A&gt;‌,&lt;/P&gt;&lt;P&gt;Hope you are doing great.&lt;/P&gt;&lt;P&gt;I will attach a project for the FRDM kl25z that do what you are trying to.&lt;/P&gt;&lt;P&gt;to get to PEE you first you have to transition from FEI &amp;gt; FBE &amp;gt;PBE &amp;gt; PEE.&lt;/P&gt;&lt;P&gt;check figure 1&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;TABLE class="j-table jiveBorder" style="border: 1px solid #c6c6c6; width: 42.7839%;"&gt;&lt;THEAD&gt;&lt;/THEAD&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TD style="width: 100%;"&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/7360i35F39BFFD334E48D/image-size/large?v=v2&amp;amp;px=999" role="button" title="pastedImage_1.png" alt="pastedImage_1.png" /&gt;&lt;/span&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;P&gt;&lt;STRONG&gt;Figure 1&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;to do the transition see this in the main.c.&lt;/P&gt;&lt;TABLE class="j-table jiveBorder" style="border: 1px solid #c6c6c6; width: 19.4705%;"&gt;&lt;THEAD&gt;&lt;/THEAD&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TD style="width: 100%;"&gt;/* Move from FEI to FBE */&lt;BR /&gt; MCG_FEI_to_FBE();&lt;BR /&gt; /* Move from FBE to PBE */&lt;BR /&gt; MCG_FBE_to_PBE();&lt;BR /&gt; /* Move from PBE to PEE */&lt;BR /&gt; MCG_PBE_to_PEE();&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;also please check if you have enabled the EXTAL and XTAL this is done in the mcg.c.&lt;/P&gt;&lt;P&gt;Hope this works and have a great day.&lt;/P&gt;&lt;P&gt;Jonathan&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 07 Nov 2016 20:02:31 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Kinetis-Software-Development-Kit/Using-the-New-Clocks-Tool-to-configure-a-custom-K24F-board-with/m-p/614000#M6377</guid>
      <dc:creator>Jonathan_Iglesias</dc:creator>
      <dc:date>2016-11-07T20:02:31Z</dc:date>
    </item>
    <item>
      <title>Re: Using the New Clocks Tool to configure a custom K24F board with a 32 MHz external crystal.</title>
      <link>https://community.nxp.com/t5/Kinetis-Software-Development-Kit/Using-the-New-Clocks-Tool-to-configure-a-custom-K24F-board-with/m-p/614001#M6378</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Jonathan,&lt;/P&gt;&lt;P&gt;Thank you for your response. I'll compare this with what I have and see where it differs. One question though, you state that EXTAL and XTAL have been enabled in mcg.c but I don't see&amp;nbsp;these pins being referenced anywhere.&lt;/P&gt;&lt;P&gt;Best,&lt;/P&gt;&lt;P&gt;Peter&amp;nbsp;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 09 Nov 2016 19:30:32 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Kinetis-Software-Development-Kit/Using-the-New-Clocks-Tool-to-configure-a-custom-K24F-board-with/m-p/614001#M6378</guid>
      <dc:creator>peterfurey</dc:creator>
      <dc:date>2016-11-09T19:30:32Z</dc:date>
    </item>
    <item>
      <title>Re: Using the New Clocks Tool to configure a custom K24F board with a 32 MHz external crystal.</title>
      <link>https://community.nxp.com/t5/Kinetis-Software-Development-Kit/Using-the-New-Clocks-Tool-to-configure-a-custom-K24F-board-with/m-p/614002#M6379</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello Peter,&lt;/P&gt;&lt;P&gt;I am sorry I did not explained properly.&lt;/P&gt;&lt;P&gt;in this part is done the configuration.&lt;/P&gt;&lt;TABLE class="j-table jiveBorder" style="border: 1px solid #c6c6c6; width: 39.5389%;"&gt;&lt;THEAD&gt;&lt;TR style="background-color: #efefef;"&gt;&lt;TH style="width: 100%;"&gt;&lt;/TH&gt;&lt;/TR&gt;&lt;/THEAD&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TD style="width: 100%;"&gt;&lt;P&gt;/* Clear RANGE field before writing a new value */&lt;BR /&gt; MCG_C2 &amp;amp;= ~MCG_C2_RANGE_MASK;&lt;/P&gt;&lt;P&gt;/* As external reference clock is greater than 8MHz, high frequency&lt;BR /&gt; * range (01) must be selected and select oscillator request */&lt;BR /&gt; MCG_C2 |= MCG_C2_RANGE(1) | MCG_C2_EREFS0_MASK;&lt;/P&gt;&lt;P&gt;/* NOTE: If Crystal is used, then enable OSC module */&lt;BR /&gt; OSC0_CR |= OSC_CR_ERCLKEN_MASK;&lt;/P&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;In the reference manual (in this case is the KL25Z because the example is for that board) you will find this section&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/7403i8640B2C7911B0032/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;the EREFS0 is used to enable an External Reference&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper" image-alt="pastedImage_3.png"&gt;&lt;img src="https://community.nxp.com/t5/image/serverpage/image-id/7461iE8E95B4D54B3DB0D/image-size/large?v=v2&amp;amp;px=999" role="button" title="pastedImage_3.png" alt="pastedImage_3.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;Hope this help you.&amp;nbsp;&lt;/P&gt;&lt;P&gt;Have a great day !&lt;/P&gt;&lt;P&gt;Jonathan&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 09 Nov 2016 20:51:29 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Kinetis-Software-Development-Kit/Using-the-New-Clocks-Tool-to-configure-a-custom-K24F-board-with/m-p/614002#M6379</guid>
      <dc:creator>Jonathan_Iglesias</dc:creator>
      <dc:date>2016-11-09T20:51:29Z</dc:date>
    </item>
    <item>
      <title>Re: Using the New Clocks Tool to configure a custom K24F board with a 32 MHz external crystal.</title>
      <link>https://community.nxp.com/t5/Kinetis-Software-Development-Kit/Using-the-New-Clocks-Tool-to-configure-a-custom-K24F-board-with/m-p/614003#M6380</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Jonathan,&lt;/P&gt;&lt;P&gt;I think I'm getting closer. I modified&amp;nbsp;the mcg.c module to work with my custom board using a 32MHz external crystal and a MK24FN1M0VLL12 MCU. I've attached&amp;nbsp;mcg.c because I'm unable to cut and paste for some reason with Window 10. In my main I'm able to successfully proceed through each transition (see below). However, after the final transition MCG_PBE_to_PEE(), the&amp;nbsp;next function call results&amp;nbsp;in the Reset_Handler getting called.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;int main(void)&lt;/P&gt;&lt;P&gt;{&lt;/P&gt;&lt;P&gt;BOARD_InitPins();&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;CLOCK_SetXtal0Freq(32000000U);&lt;/P&gt;&lt;P&gt;MCG_FEI_to_FBE();&amp;nbsp;&amp;nbsp; &amp;nbsp;// transitioned successfully&lt;/P&gt;&lt;P&gt;MCG_FBE_to_PBE();&amp;nbsp; // transitioned successfully&lt;/P&gt;&lt;P&gt;MCG_PBE_to_PEE();&amp;nbsp; // appears to transition successfully&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;delay(DELAY_VALE);&amp;nbsp;&amp;nbsp;&amp;nbsp; // Reset occurs here&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;for (;;)&lt;/P&gt;&lt;P&gt;{&lt;/P&gt;&lt;P&gt;&amp;nbsp; ___asm("NOP");&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;Looking at the Reset Control Module (RCM), I see that the LOCKUP bit in the RCM_SRS1 register gets set. Indicating an ARM core LOCKUP event. Any idea what might be causing this?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks,&lt;/P&gt;&lt;P&gt;Peter&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 16 Nov 2016 20:24:09 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Kinetis-Software-Development-Kit/Using-the-New-Clocks-Tool-to-configure-a-custom-K24F-board-with/m-p/614003#M6380</guid>
      <dc:creator>peterfurey</dc:creator>
      <dc:date>2016-11-16T20:24:09Z</dc:date>
    </item>
    <item>
      <title>Re: Using the New Clocks Tool to configure a custom K24F board with a 32 MHz external crystal.</title>
      <link>https://community.nxp.com/t5/Kinetis-Software-Development-Kit/Using-the-New-Clocks-Tool-to-configure-a-custom-K24F-board-with/m-p/614004#M6381</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello&amp;nbsp; again Jonathan,&lt;/P&gt;&lt;P&gt;OK, I was able to eliminate the ARM core LOCKUP event by reducing the clock frequencies. In particular, I changed the PRDIV value from 8 to 16 resulting in the system clock going from 96 MHz to 48MHz. However, I still don't understand why the higher frequency clocks would result in a LOCKUP event since it's within the specs of the MCU. Any insights from anyone on this would be appreciated. Otherwise I'll continue on my merry way for the time being. Thank you. Peter&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 18 Nov 2016 21:35:42 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Kinetis-Software-Development-Kit/Using-the-New-Clocks-Tool-to-configure-a-custom-K24F-board-with/m-p/614004#M6381</guid>
      <dc:creator>peterfurey</dc:creator>
      <dc:date>2016-11-18T21:35:42Z</dc:date>
    </item>
  </channel>
</rss>

