<?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: MK22FN256(64LQFP)  PWM  in Kinetis Microcontrollers</title>
    <link>https://community.nxp.com/t5/Kinetis-Microcontrollers/MK22FN256-64LQFP-PWM/m-p/764745#M46568</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Mark,&amp;nbsp; TU1 is only used for the PWM.&lt;/P&gt;&lt;P&gt;The code for my heartbeat function is below.&amp;nbsp;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I did inherit this code from an old co-worker.&amp;nbsp; If it's timer driven or software driven based on a Tick, I'm not certain.&lt;/P&gt;&lt;P&gt;I've been trying to figure that part out without success.&amp;nbsp;&amp;nbsp;&lt;/P&gt;&lt;P&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/27460i28119605561852E1/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;/P&gt;&lt;P&gt;The enable/disabled contents within TU1 is listed below:&lt;/P&gt;&lt;P&gt;&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/27377i2AB70B3AEE40F105/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;How can I confirm if a "Tick interrupt" is being used?&amp;nbsp; Note, I have no external clocks coming into the uC.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks Mark,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Brian&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Thu, 15 Mar 2018 22:12:41 GMT</pubDate>
    <dc:creator>briancavanagh</dc:creator>
    <dc:date>2018-03-15T22:12:41Z</dc:date>
    <item>
      <title>MK22FN256(64LQFP)  PWM</title>
      <link>https://community.nxp.com/t5/Kinetis-Microcontrollers/MK22FN256-64LQFP-PWM/m-p/764743#M46566</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi, I'm using the PWM component and assigned it to PTD5(Pin 62).&amp;nbsp; I also have a 'heartbeat' led assigned to PTC1(Pin 44) that blinks every 10 seconds.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;When I change the Period for the PWM it also has a direct&amp;nbsp;impact on the heartbeat.&lt;/P&gt;&lt;P&gt;Below you'll see the Period is .5kHz.&amp;nbsp; If I change to 1kHz, my heartbeat changes also and blinks every 5 seconds.&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/27334i1F282CB419843E8C/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;/P&gt;&lt;P&gt;TU1:TimerUnit_LDD is assigned to the PWM:&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/27375iDB50DD93FDF1C112/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;To determine if TU1 had an affect on any other components I removed it from my project to determine which components were affected by it:&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/27459iAF1C3CE8A4E7DA13/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;As you can see above, only PWM1:PWM was affected.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Can someone explain why this would happen.&amp;nbsp; I'm not sure how to fix this and why the PWM period has an impact on other components that are not using it.&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;Brian&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Note:&amp;nbsp; I'm using KDS Version 3.2.0&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 15 Mar 2018 18:28:10 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Kinetis-Microcontrollers/MK22FN256-64LQFP-PWM/m-p/764743#M46566</guid>
      <dc:creator>briancavanagh</dc:creator>
      <dc:date>2018-03-15T18:28:10Z</dc:date>
    </item>
    <item>
      <title>Re: MK22FN256(64LQFP)  PWM</title>
      <link>https://community.nxp.com/t5/Kinetis-Microcontrollers/MK22FN256-64LQFP-PWM/m-p/764744#M46567</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Brian&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I think that you need ti explain what is driving the heart-beat LED (is it timer driven? Which timer, Is it SW driven based on a Tick interrupt - which tick?).&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;PWM from the FlexTimer is driven by the bus clock or the fixed clock MCGFFCLK (unless the clock is from an external pin) and an optional pre-scaler, so as long as some setting is not adjusting your main clock or bus clock divider (or sharing a FlexTimer) I also don't see the relationship at the moment.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Mark&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 15 Mar 2018 21:55:38 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Kinetis-Microcontrollers/MK22FN256-64LQFP-PWM/m-p/764744#M46567</guid>
      <dc:creator>mjbcswitzerland</dc:creator>
      <dc:date>2018-03-15T21:55:38Z</dc:date>
    </item>
    <item>
      <title>Re: MK22FN256(64LQFP)  PWM</title>
      <link>https://community.nxp.com/t5/Kinetis-Microcontrollers/MK22FN256-64LQFP-PWM/m-p/764745#M46568</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Mark,&amp;nbsp; TU1 is only used for the PWM.&lt;/P&gt;&lt;P&gt;The code for my heartbeat function is below.&amp;nbsp;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I did inherit this code from an old co-worker.&amp;nbsp; If it's timer driven or software driven based on a Tick, I'm not certain.&lt;/P&gt;&lt;P&gt;I've been trying to figure that part out without success.&amp;nbsp;&amp;nbsp;&lt;/P&gt;&lt;P&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/27460i28119605561852E1/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;/P&gt;&lt;P&gt;The enable/disabled contents within TU1 is listed below:&lt;/P&gt;&lt;P&gt;&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/27377i2AB70B3AEE40F105/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;How can I confirm if a "Tick interrupt" is being used?&amp;nbsp; Note, I have no external clocks coming into the uC.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks Mark,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Brian&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 15 Mar 2018 22:12:41 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Kinetis-Microcontrollers/MK22FN256-64LQFP-PWM/m-p/764745#M46568</guid>
      <dc:creator>briancavanagh</dc:creator>
      <dc:date>2018-03-15T22:12:41Z</dc:date>
    </item>
    <item>
      <title>Re: MK22FN256(64LQFP)  PWM</title>
      <link>https://community.nxp.com/t5/Kinetis-Microcontrollers/MK22FN256-64LQFP-PWM/m-p/764746#M46569</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Brian&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Search for the variable Tick and see where it is being "incremented". I suspect it will be in a timer routine (usually Systick interrupt).&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Mark&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 15 Mar 2018 23:00:28 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Kinetis-Microcontrollers/MK22FN256-64LQFP-PWM/m-p/764746#M46569</guid>
      <dc:creator>mjbcswitzerland</dc:creator>
      <dc:date>2018-03-15T23:00:28Z</dc:date>
    </item>
  </channel>
</rss>

