<?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: Processor Expert seems not to call Clock Init function in KDS(KSDK) in Kinetis Software Development Kit</title>
    <link>https://community.nxp.com/t5/Kinetis-Software-Development-Kit/Processor-Expert-seems-not-to-call-Clock-Init-function-in-KDS/m-p/491328#M4442</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello, Jorge&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Yes! You hit the bull's eye!&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;After following Erich's tutorial, the grayed out areas became white. But, as you said, that is not an issue, since the code is executed in a debug session, even when it is in gray. What really matters is if the macro above the code is enabled or not.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thank you Jorge and Erich very much for your efective support once again.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Best regards,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Marco Coelho&lt;/P&gt;&lt;P&gt;Applications Engineer&lt;/P&gt;&lt;P&gt;Siletec Eletronica&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Fri, 18 Dec 2015 17:04:47 GMT</pubDate>
    <dc:creator>MAPC</dc:creator>
    <dc:date>2015-12-18T17:04:47Z</dc:date>
    <item>
      <title>Processor Expert seems not to call Clock Init function in KDS(KSDK)</title>
      <link>https://community.nxp.com/t5/Kinetis-Software-Development-Kit/Processor-Expert-seems-not-to-call-Clock-Init-function-in-KDS/m-p/491324#M4438</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 noticed that Processor Expert doesn't generate a call to Clock System Initialization function inside "hardware_init" function. So, my question is, where is this called? Or it is not called anywhere and I must drag and drop into my code (what wouldn't make any sense to me, since it should be a Processor Expert role)?&lt;/P&gt;&lt;P style="min-height: 8pt; padding: 0px;"&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;When I place the mouse over "HW Initialization", KDS tells me the initialization of clock system is automatic and is performed via CMSIS startup, but where is this startup file, where is the call for a Clock Initialization function?&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="117174_117174.png"&gt;&lt;img src="https://community.nxp.com/t5/image/serverpage/image-id/120886iB7AB7BEC362E0FC2/image-size/large?v=v2&amp;amp;px=999" role="button" title="117174_117174.png" alt="117174_117174.png" /&gt;&lt;/span&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/8920i6CA44F9DA85766B2/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 style="min-height: 8pt; padding: 0px;"&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;"hardware_init" and "PEX_components_init" functions are in grey, although "CPU_HARDWARE_INIT" and "PEX_COMPONENTS_INIT" macros are enabled:&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="117175_117175.png"&gt;&lt;img src="https://community.nxp.com/t5/image/serverpage/image-id/120887iE5A9A8CAFBACC891/image-size/large?v=v2&amp;amp;px=999" role="button" title="117175_117175.png" alt="117175_117175.png" /&gt;&lt;/span&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/37122i72025DABA33724B5/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;The same ocurrs for "Components_Init" function, which doesn't have anything inside it:&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="117182_117182.png"&gt;&lt;img src="https://community.nxp.com/t5/image/serverpage/image-id/120888i93A50F7FD44E1A40/image-size/large?v=v2&amp;amp;px=999" role="button" title="117182_117182.png" alt="117182_117182.png" /&gt;&lt;/span&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/9009iBAF6758AB4EE3780/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 style="min-height: 8pt; padding: 0px;"&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #e23d39;"&gt;#if CPU_COMPONENTS_INIT&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #e23d39;"&gt;void Components_Init(void)&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #e23d39;"&gt;{&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="min-height: 8pt; padding: 0px;"&gt;&amp;nbsp;&lt;/P&gt;&lt;P style="min-height: 8pt; padding: 0px;"&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #e23d39;"&gt;}&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="min-height: 8pt; padding: 0px;"&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;As you can see bellow, "hardware_init" function doesn't call any Clock System Initialization function, what should be the expected.&lt;/P&gt;&lt;P style="min-height: 8pt; padding: 0px;"&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #e23d39;"&gt;void hardware_init(void) {&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="min-height: 8pt; padding: 0px;"&gt;&amp;nbsp;&lt;/P&gt;&lt;P style="min-height: 8pt; padding: 0px;"&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #e23d39;"&gt;&amp;nbsp; /* Enable clock for PORTs */&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #e23d39;"&gt;&amp;nbsp; SIM_HAL_EnableClock(SIM,kSimClockGatePortA);&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="min-height: 8pt; padding: 0px;"&gt;&amp;nbsp;&lt;/P&gt;&lt;P style="min-height: 8pt; padding: 0px;"&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #e23d39;"&gt;&amp;nbsp; /* Setup board clock source. */&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #e23d39;"&gt;&amp;nbsp; g_xtal0ClkFreq = 8000000U;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; /* Value of the external crystal or oscillator clock frequency of the system oscillator (OSC) in Hz */&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #e23d39;"&gt;&amp;nbsp; g_xtalRtcClkFreq = 32768U;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; /* Value of the external 32k crystal or oscillator clock frequency of the RTC in Hz */&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #e23d39;"&gt;&amp;nbsp; &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #e23d39;"&gt;&amp;nbsp; init_jtag_pins(JTAG_IDX);&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #e23d39;"&gt;&amp;nbsp; init_osc_pins(OSC_IDX);&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #e23d39;"&gt;&amp;nbsp; init_tpiu_pins(TPIU_IDX);&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #e23d39;"&gt;}&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="min-height: 8pt; padding: 0px;"&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;My Project is using bare metal, KDS and KSDK 1.3.0. And the MCU is MK22FN256.&lt;/P&gt;&lt;P style="min-height: 8pt; padding: 0px;"&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I tested with a new project with MK22FX512, and the functions, this time, are not in grey, unlike with MK222FN256. But I also can't see any reference to a Clock Initialization function. Should it be a Processor Expert bug?&lt;/P&gt;&lt;P style="min-height: 8pt; padding: 0px;"&gt;&amp;nbsp;&lt;/P&gt;&lt;P style="min-height: 8pt; padding: 0px;"&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks,&lt;/P&gt;&lt;P style="min-height: 8pt; padding: 0px;"&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Marco Coelho&lt;/P&gt;&lt;P&gt;Applications Engineer&lt;/P&gt;&lt;P&gt;Siletec Eletronica&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 17 Dec 2015 13:57:34 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Kinetis-Software-Development-Kit/Processor-Expert-seems-not-to-call-Clock-Init-function-in-KDS/m-p/491324#M4438</guid>
      <dc:creator>MAPC</dc:creator>
      <dc:date>2015-12-17T13:57:34Z</dc:date>
    </item>
    <item>
      <title>Re: Processor Expert seems not to call Clock Init function in KDS(KSDK)</title>
      <link>https://community.nxp.com/t5/Kinetis-Software-Development-Kit/Processor-Expert-seems-not-to-call-Clock-Init-function-in-KDS/m-p/491325#M4439</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello Marco Aurelio:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Clock initialization is made in the function &lt;STRONG&gt;SystemInit()&lt;/STRONG&gt; from the file &lt;STRONG&gt;system_&amp;lt;device&amp;gt;.c&lt;/STRONG&gt;. This function uses the macro definitions from the header file &lt;STRONG&gt;system_&amp;lt;device&amp;gt;.h&lt;/STRONG&gt;.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;System clock is initialized before reaching &lt;STRONG&gt;main&lt;/STRONG&gt;. The initial configuration used is the one you select from the &lt;STRONG&gt;fsl_clock_manager&lt;/STRONG&gt; component. See below an example:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper" image-alt="K64_Clock_configs.png"&gt;&lt;img src="https://community.nxp.com/t5/image/serverpage/image-id/31102iCEC60B883FCFDB4B/image-size/large?v=v2&amp;amp;px=999" role="button" title="K64_Clock_configs.png" alt="K64_Clock_configs.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;In this case there are 6 clock configurations and the configuration 1 is used for the CMSIS startup code.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;To dynamically change between clock configurations in your project&lt;STRONG&gt;,&lt;/STRONG&gt; then you can use the Clock System APIs. See the next discussion in the community about this subject with an example project:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;A href="https://community.nxp.com/thread/357115"&gt;Change between clock configurations&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;Regards!,&lt;BR /&gt;Jorge Gonzalez&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, 18 Dec 2015 04:08:33 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Kinetis-Software-Development-Kit/Processor-Expert-seems-not-to-call-Clock-Init-function-in-KDS/m-p/491325#M4439</guid>
      <dc:creator>Jorge_Gonzalez</dc:creator>
      <dc:date>2015-12-18T04:08:33Z</dc:date>
    </item>
    <item>
      <title>Re: Processor Expert seems not to call Clock Init function in KDS(KSDK)</title>
      <link>https://community.nxp.com/t5/Kinetis-Software-Development-Kit/Processor-Expert-seems-not-to-call-Clock-Init-function-in-KDS/m-p/491326#M4440</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;SystemInit function is all in grey. What should I do?&lt;/P&gt;&lt;P&gt;&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/32781i6BB3FBA985A54FE2/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;/P&gt;&lt;P&gt;Have attached my code.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks!&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Marco Coelho&lt;/P&gt;&lt;P&gt;Applications Engineer&lt;/P&gt;&lt;P&gt;Siletec Eletronica&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 18 Dec 2015 12:24:12 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Kinetis-Software-Development-Kit/Processor-Expert-seems-not-to-call-Clock-Init-function-in-KDS/m-p/491326#M4440</guid>
      <dc:creator>MAPC</dc:creator>
      <dc:date>2015-12-18T12:24:12Z</dc:date>
    </item>
    <item>
      <title>Re: Processor Expert seems not to call Clock Init function in KDS(KSDK)</title>
      <link>https://community.nxp.com/t5/Kinetis-Software-Development-Kit/Processor-Expert-seems-not-to-call-Clock-Init-function-in-KDS/m-p/491327#M4441</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello Marco:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;From my side it does not appear grayed out. It may be that the Eclipse indexer is having issues in your case. See if the next post by Erich helps you resolve it:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;A href="http://mcuoneclipse.com/2012/03/20/fixing-the-eclipse-index/" title="http://mcuoneclipse.com/2012/03/20/fixing-the-eclipse-index/"&gt;Fixing the Eclipse Index | MCU on Eclipse&lt;/A&gt; &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;So, I do not always trust in the grayed or not-grayed out code. Instead open a debug session and see what code is actually executed, or visually inspect the macros to see what code is valid.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards!&lt;/P&gt;&lt;P&gt;Jorge Gonzalez&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 18 Dec 2015 15:05:03 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Kinetis-Software-Development-Kit/Processor-Expert-seems-not-to-call-Clock-Init-function-in-KDS/m-p/491327#M4441</guid>
      <dc:creator>Jorge_Gonzalez</dc:creator>
      <dc:date>2015-12-18T15:05:03Z</dc:date>
    </item>
    <item>
      <title>Re: Processor Expert seems not to call Clock Init function in KDS(KSDK)</title>
      <link>https://community.nxp.com/t5/Kinetis-Software-Development-Kit/Processor-Expert-seems-not-to-call-Clock-Init-function-in-KDS/m-p/491328#M4442</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello, Jorge&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Yes! You hit the bull's eye!&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;After following Erich's tutorial, the grayed out areas became white. But, as you said, that is not an issue, since the code is executed in a debug session, even when it is in gray. What really matters is if the macro above the code is enabled or not.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thank you Jorge and Erich very much for your efective support once again.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Best regards,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Marco Coelho&lt;/P&gt;&lt;P&gt;Applications Engineer&lt;/P&gt;&lt;P&gt;Siletec Eletronica&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 18 Dec 2015 17:04:47 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Kinetis-Software-Development-Kit/Processor-Expert-seems-not-to-call-Clock-Init-function-in-KDS/m-p/491328#M4442</guid>
      <dc:creator>MAPC</dc:creator>
      <dc:date>2015-12-18T17:04:47Z</dc:date>
    </item>
    <item>
      <title>Re: Processor Expert seems not to call Clock Init function in KDS(KSDK)</title>
      <link>https://community.nxp.com/t5/Kinetis-Software-Development-Kit/Processor-Expert-seems-not-to-call-Clock-Init-function-in-KDS/m-p/491329#M4443</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Good to know you fixed it, you are very welcome Marco!&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards!&lt;BR /&gt;Jorge Gonzalez&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 18 Dec 2015 17:47:02 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Kinetis-Software-Development-Kit/Processor-Expert-seems-not-to-call-Clock-Init-function-in-KDS/m-p/491329#M4443</guid>
      <dc:creator>Jorge_Gonzalez</dc:creator>
      <dc:date>2015-12-18T17:47:02Z</dc:date>
    </item>
  </channel>
</rss>

