<?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 Unable to modify PWM duty cycle in Kinetis Microcontrollers</title>
    <link>https://community.nxp.com/t5/Kinetis-Microcontrollers/Unable-to-modify-PWM-duty-cycle/m-p/1029213#M56455</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I have a working TWR_K60D freeRTOS project.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I am confused as to why the&amp;nbsp;FTM_UpdatePwmDutycycle() API call does not update the required FTM0-C2V registers unless I single step with the debugger.&amp;nbsp; When I allow the code to run without stepping, it will not update the registers.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The code can be cloned from the following GitHub repository:&amp;nbsp;&lt;A class="link-titled" href="https://github.com/tsbiberdorf/freeRTOS_TwrK60D.git" title="https://github.com/tsbiberdorf/freeRTOS_TwrK60D.git"&gt;GitHub - tsbiberdorf/freeRTOS_TwrK60D: freeRTOS project to run on TWR_K60D hardware with FTM0 PWM operation&lt;/A&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The README file provides the h/w connections to the Tower Expansion board.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;When I run the code and place a breakpoint on line 141 and 144 of FTM0Operation.c&lt;/P&gt;&lt;P&gt;at the same time I am monitoring the FTM0 registers.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;When I hit the breakpoint on 141 the FTM0 registers provide this:&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/100649i43495F821DBC797B/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;when I allow the code to continue to 144 the registers have not been updated:&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/100691i4319BAB16E0BC606/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;&lt;/P&gt;&lt;P&gt;Now if I reset the code and allow to run to breakpoint on 141, but single step through the&amp;nbsp;FTM_UpdatePwmDutycycle() API, I find that the registers are updated.&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper" image-alt="pastedImage_4.png"&gt;&lt;img src="https://community.nxp.com/t5/image/serverpage/image-id/100737i504C932195EC3BDA/image-size/large?v=v2&amp;amp;px=999" role="button" title="pastedImage_4.png" alt="pastedImage_4.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;Why does this not work when running?&amp;nbsp; why does it only work when single step is happening?&amp;nbsp; Is there a locking sequence that I'm missing?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Fri, 31 Jan 2020 18:40:34 GMT</pubDate>
    <dc:creator>tbiberdorf</dc:creator>
    <dc:date>2020-01-31T18:40:34Z</dc:date>
    <item>
      <title>Unable to modify PWM duty cycle</title>
      <link>https://community.nxp.com/t5/Kinetis-Microcontrollers/Unable-to-modify-PWM-duty-cycle/m-p/1029213#M56455</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I have a working TWR_K60D freeRTOS project.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I am confused as to why the&amp;nbsp;FTM_UpdatePwmDutycycle() API call does not update the required FTM0-C2V registers unless I single step with the debugger.&amp;nbsp; When I allow the code to run without stepping, it will not update the registers.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The code can be cloned from the following GitHub repository:&amp;nbsp;&lt;A class="link-titled" href="https://github.com/tsbiberdorf/freeRTOS_TwrK60D.git" title="https://github.com/tsbiberdorf/freeRTOS_TwrK60D.git"&gt;GitHub - tsbiberdorf/freeRTOS_TwrK60D: freeRTOS project to run on TWR_K60D hardware with FTM0 PWM operation&lt;/A&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The README file provides the h/w connections to the Tower Expansion board.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;When I run the code and place a breakpoint on line 141 and 144 of FTM0Operation.c&lt;/P&gt;&lt;P&gt;at the same time I am monitoring the FTM0 registers.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;When I hit the breakpoint on 141 the FTM0 registers provide this:&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/100649i43495F821DBC797B/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;when I allow the code to continue to 144 the registers have not been updated:&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/100691i4319BAB16E0BC606/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;&lt;/P&gt;&lt;P&gt;Now if I reset the code and allow to run to breakpoint on 141, but single step through the&amp;nbsp;FTM_UpdatePwmDutycycle() API, I find that the registers are updated.&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper" image-alt="pastedImage_4.png"&gt;&lt;img src="https://community.nxp.com/t5/image/serverpage/image-id/100737i504C932195EC3BDA/image-size/large?v=v2&amp;amp;px=999" role="button" title="pastedImage_4.png" alt="pastedImage_4.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;Why does this not work when running?&amp;nbsp; why does it only work when single step is happening?&amp;nbsp; Is there a locking sequence that I'm missing?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 31 Jan 2020 18:40:34 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Kinetis-Microcontrollers/Unable-to-modify-PWM-duty-cycle/m-p/1029213#M56455</guid>
      <dc:creator>tbiberdorf</dc:creator>
      <dc:date>2020-01-31T18:40:34Z</dc:date>
    </item>
    <item>
      <title>Re: Unable to modify PWM duty cycle</title>
      <link>https://community.nxp.com/t5/Kinetis-Microcontrollers/Unable-to-modify-PWM-duty-cycle/m-p/1029214#M56456</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I added the API call&amp;nbsp;FTM_SetDeadTimeEnable() and now the code is working as expected.&amp;nbsp; Not sure why, but happy that its working.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 06 Feb 2020 19:02:08 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Kinetis-Microcontrollers/Unable-to-modify-PWM-duty-cycle/m-p/1029214#M56456</guid>
      <dc:creator>tbiberdorf</dc:creator>
      <dc:date>2020-02-06T19:02:08Z</dc:date>
    </item>
  </channel>
</rss>

