<?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 Output a kHz range clock through a GPIO? in Kinetis Microcontrollers</title>
    <link>https://community.nxp.com/t5/Kinetis-Microcontrollers/Output-a-kHz-range-clock-through-a-GPIO/m-p/1062597#M57130</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi&lt;/P&gt;&lt;P&gt;I'm trying to output a 4 kHz 50% duty cycle square waveform through&amp;nbsp;a GPIO. What is the simplest way of doing that?&amp;nbsp;&lt;/P&gt;&lt;P&gt;It doesn't need to be exactly 4 kHz.&amp;nbsp;I accept some tolerance around the target.&amp;nbsp;&lt;/P&gt;&lt;P&gt;I was considering to use FAST_IRCLK as time base, divide the clock by 1024 and output it. Is it possible?&lt;/P&gt;&lt;P&gt;&amp;nbsp;I'm using MCUXpresso with KL02 SDK.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thank you&lt;/P&gt;&lt;P&gt;Andre VB&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Fri, 03 Jul 2020 22:03:39 GMT</pubDate>
    <dc:creator>nxa09603</dc:creator>
    <dc:date>2020-07-03T22:03:39Z</dc:date>
    <item>
      <title>Output a kHz range clock through a GPIO?</title>
      <link>https://community.nxp.com/t5/Kinetis-Microcontrollers/Output-a-kHz-range-clock-through-a-GPIO/m-p/1062597#M57130</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi&lt;/P&gt;&lt;P&gt;I'm trying to output a 4 kHz 50% duty cycle square waveform through&amp;nbsp;a GPIO. What is the simplest way of doing that?&amp;nbsp;&lt;/P&gt;&lt;P&gt;It doesn't need to be exactly 4 kHz.&amp;nbsp;I accept some tolerance around the target.&amp;nbsp;&lt;/P&gt;&lt;P&gt;I was considering to use FAST_IRCLK as time base, divide the clock by 1024 and output it. Is it possible?&lt;/P&gt;&lt;P&gt;&amp;nbsp;I'm using MCUXpresso with KL02 SDK.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thank you&lt;/P&gt;&lt;P&gt;Andre VB&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 03 Jul 2020 22:03:39 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Kinetis-Microcontrollers/Output-a-kHz-range-clock-through-a-GPIO/m-p/1062597#M57130</guid>
      <dc:creator>nxa09603</dc:creator>
      <dc:date>2020-07-03T22:03:39Z</dc:date>
    </item>
    <item>
      <title>Re: Output a kHz range clock through a GPIO?</title>
      <link>https://community.nxp.com/t5/Kinetis-Microcontrollers/Output-a-kHz-range-clock-through-a-GPIO/m-p/1062598#M57131</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hey &lt;A class="jx-jive-macro-user" href="https://community.nxp.com/people/nxa09603"&gt;nxa09603&lt;/A&gt;‌,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The simplest way of doing it is to use one of the&amp;nbsp;TPMs (Timer/PWM Modules) built into the KL02 to generate a PWM signal.&amp;nbsp;&amp;nbsp;Just taking a quick look at the datasheet/RM, you will use one of the TM#_CH# pins as your output.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I should note that the TPMs are different from the FTMs of other Kinetis parts but there should be an example in the SDK that you can see in MCUXpresso and copy over quickly.&amp;nbsp;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Good luck,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;myke&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 04 Jul 2020 16:40:54 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Kinetis-Microcontrollers/Output-a-kHz-range-clock-through-a-GPIO/m-p/1062598#M57131</guid>
      <dc:creator>myke_predko</dc:creator>
      <dc:date>2020-07-04T16:40:54Z</dc:date>
    </item>
    <item>
      <title>Re: Output a kHz range clock through a GPIO?</title>
      <link>https://community.nxp.com/t5/Kinetis-Microcontrollers/Output-a-kHz-range-clock-through-a-GPIO/m-p/1062599#M57132</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;See also&lt;BR /&gt;&lt;A href="https://www.utasker.com/docs/uTasker/uTaskerHWTimers.PDF" target="test_blank"&gt;https://www.utasker.com/docs/uTasker/uTaskerHWTimers.PDF&lt;/A&gt;&lt;BR /&gt;&lt;A href="https://www.utasker.com/kinetis/FRDM-KL02Z.html" target="test_blank"&gt;https://www.utasker.com/kinetis/FRDM-KL02Z.html&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Available as open source on Git Hub "uTasker" including KL02 support and simulation - eg. generating 1kHz 20% output on PTB10:&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/114651i7D5D22049008A0EC/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;&lt;BR /&gt;Regards&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Mark&lt;BR /&gt;&lt;EM&gt;[uTasker project developer for Kinetis and i.MX RT]&lt;/EM&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sun, 05 Jul 2020 22:20:23 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Kinetis-Microcontrollers/Output-a-kHz-range-clock-through-a-GPIO/m-p/1062599#M57132</guid>
      <dc:creator>mjbcswitzerland</dc:creator>
      <dc:date>2020-07-05T22:20:23Z</dc:date>
    </item>
  </channel>
</rss>

