<?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 Kinetis KV4x - enabling clock output on the CLKOUT pin in Kinetis Microcontrollers</title>
    <link>https://community.nxp.com/t5/Kinetis-Microcontrollers/Kinetis-KV4x-enabling-clock-output-on-the-CLKOUT-pin/m-p/1672679#M65197</link>
    <description>&lt;P&gt;I'm trying to enable clock output on the CLKOUT pin while running the microcontroller in "High-Frequency, High-Gain" mode.&lt;/P&gt;&lt;P&gt;To enable this output, I configured the microcontroller as follows:&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;1) I enabled the CLKOUT pin&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="c"&gt;// enables CLKOUT alternate function on pin PTC3
CLOCK_EnableClock(kCLOCK_PortC);
PORT_SetPinMux(PORTC, 3U, kPORT_MuxAlt5);&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;2) I enabled the external reference clock on the CLKOUT pin&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="c"&gt;OSC-&amp;gt;CR |= OSC_CR_ERCLKEN(1); // enables OSCERCLK)
SIM-&amp;gt;SOPT2 |= SIM_SOPT2_CLKOUTSEL(6); // CLKOUTSEL = OSCERCLK&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I'm not able to measure anything on the CLKOUT pin, am I missing something? &lt;STRONG&gt;The same configuration shown above works if I configure the microcontroller in "High-Frequency, Low-Power Mode"&lt;/STRONG&gt;: in this case I'm able to measure the clock waveform on&amp;nbsp;CLKOUT pin.&lt;/P&gt;&lt;P&gt;(my application works without problems in both "low power" and "high gain" modes)&lt;/P&gt;&lt;P&gt;Thanks for your help.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Tue, 20 Jun 2023 12:17:01 GMT</pubDate>
    <dc:creator>nariane</dc:creator>
    <dc:date>2023-06-20T12:17:01Z</dc:date>
    <item>
      <title>Kinetis KV4x - enabling clock output on the CLKOUT pin</title>
      <link>https://community.nxp.com/t5/Kinetis-Microcontrollers/Kinetis-KV4x-enabling-clock-output-on-the-CLKOUT-pin/m-p/1672679#M65197</link>
      <description>&lt;P&gt;I'm trying to enable clock output on the CLKOUT pin while running the microcontroller in "High-Frequency, High-Gain" mode.&lt;/P&gt;&lt;P&gt;To enable this output, I configured the microcontroller as follows:&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;1) I enabled the CLKOUT pin&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="c"&gt;// enables CLKOUT alternate function on pin PTC3
CLOCK_EnableClock(kCLOCK_PortC);
PORT_SetPinMux(PORTC, 3U, kPORT_MuxAlt5);&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;2) I enabled the external reference clock on the CLKOUT pin&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="c"&gt;OSC-&amp;gt;CR |= OSC_CR_ERCLKEN(1); // enables OSCERCLK)
SIM-&amp;gt;SOPT2 |= SIM_SOPT2_CLKOUTSEL(6); // CLKOUTSEL = OSCERCLK&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I'm not able to measure anything on the CLKOUT pin, am I missing something? &lt;STRONG&gt;The same configuration shown above works if I configure the microcontroller in "High-Frequency, Low-Power Mode"&lt;/STRONG&gt;: in this case I'm able to measure the clock waveform on&amp;nbsp;CLKOUT pin.&lt;/P&gt;&lt;P&gt;(my application works without problems in both "low power" and "high gain" modes)&lt;/P&gt;&lt;P&gt;Thanks for your help.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 20 Jun 2023 12:17:01 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Kinetis-Microcontrollers/Kinetis-KV4x-enabling-clock-output-on-the-CLKOUT-pin/m-p/1672679#M65197</guid>
      <dc:creator>nariane</dc:creator>
      <dc:date>2023-06-20T12:17:01Z</dc:date>
    </item>
    <item>
      <title>Re: Kinetis KV4x - enabling clock output on the CLKOUT pin</title>
      <link>https://community.nxp.com/t5/Kinetis-Microcontrollers/Kinetis-KV4x-enabling-clock-output-on-the-CLKOUT-pin/m-p/1673365#M65200</link>
      <description>&lt;P&gt;I managed to solve my problem by dividing the frequency of OSCERCLK by 2&lt;/P&gt;&lt;LI-CODE lang="c"&gt;// Divide OSCERCLK clock frequency by 2
OSC-&amp;gt;DIV &amp;amp;= ~(OSC_DIV_ERPS_MASK);
OSC-&amp;gt;DIV |= OSC_DIV_ERPS(1);&lt;/LI-CODE&gt;&lt;P&gt;Apparently the clock frequency was too high (10Mhz); if I lower it to 5Mhz it works even in high gain mode.&lt;/P&gt;</description>
      <pubDate>Wed, 21 Jun 2023 07:24:28 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Kinetis-Microcontrollers/Kinetis-KV4x-enabling-clock-output-on-the-CLKOUT-pin/m-p/1673365#M65200</guid>
      <dc:creator>nariane</dc:creator>
      <dc:date>2023-06-21T07:24:28Z</dc:date>
    </item>
  </channel>
</rss>

