<?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: PWM with FTM on KW24D512 in Kinetis Microcontrollers</title>
    <link>https://community.nxp.com/t5/Kinetis-Microcontrollers/PWM-with-FTM-on-KW24D512/m-p/556638#M33720</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Pavel,&lt;/P&gt;&lt;P&gt;The example code for FTM works fine with your changes!&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thank's a lot.&lt;/P&gt;&lt;P&gt;Regards.&lt;/P&gt;&lt;P&gt;Fabrice.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Fri, 26 Aug 2016 09:13:49 GMT</pubDate>
    <dc:creator>fabricetocci</dc:creator>
    <dc:date>2016-08-26T09:13:49Z</dc:date>
    <item>
      <title>PWM with FTM on KW24D512</title>
      <link>https://community.nxp.com/t5/Kinetis-Microcontrollers/PWM-with-FTM-on-KW24D512/m-p/556634#M33716</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P style="min-height: 8pt; padding: 0px;"&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I'm building a wireless product on KW242512 IC.&lt;BR /&gt;I planned to drive a LED brightness with a PWM signal.&lt;/P&gt;&lt;P style="min-height: 8pt; padding: 0px;"&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I started with KSDK1.3.0 / examples / twrkw24d512 / driver_examples / ftm&lt;/P&gt;&lt;P style="min-height: 8pt; padding: 0px;"&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;PTD4 configured as FTM0_Ch4 is used to drive LED brightness.&lt;/P&gt;&lt;P&gt;I have changed board.h as follow&lt;BR /&gt;/* The Flextimer instance/channel used for board */&lt;BR /&gt;#define BOARD_FTM_INSTANCE&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 0&lt;BR /&gt;#define BOARD_FTM_CHANNEL&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 4&lt;/P&gt;&lt;P style="min-height: 8pt; padding: 0px;"&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;When I run the example code nothing happens on PTD4 where I thought a PWM wave will show up.&lt;BR /&gt;What is wrong in my setting?&lt;BR /&gt;How do I need to use this example code to get a PWM signal on PTD4 pin.&lt;/P&gt;&lt;P style="min-height: 8pt; padding: 0px;"&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Attached the project files&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Original Attachment has been moved to: &lt;A _jive_internal="true" href="https://community.nxp.com/docs/DOC-337559"&gt;board.h.zip&lt;/A&gt;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Original Attachment has been moved to: &lt;A _jive_internal="true" href="https://community.nxp.com/docs/DOC-337559"&gt;main.c.zip&lt;/A&gt;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Original Attachment has been moved to: &lt;A _jive_internal="true" href="https://community.nxp.com/docs/DOC-337559"&gt;pin_mux.c.zip&lt;/A&gt;&lt;/STRONG&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 24 Aug 2016 11:04:25 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Kinetis-Microcontrollers/PWM-with-FTM-on-KW24D512/m-p/556634#M33716</guid>
      <dc:creator>fabricetocci</dc:creator>
      <dc:date>2016-08-24T11:04:25Z</dc:date>
    </item>
    <item>
      <title>Re: PWM with FTM on KW24D512</title>
      <link>https://community.nxp.com/t5/Kinetis-Microcontrollers/PWM-with-FTM-on-KW24D512/m-p/556635#M33717</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Fabrice,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I have to start with the obvious questions first. &amp;nbsp;What development platform are you using? &amp;nbsp;FRDM? &amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Are you positive the code is running? &amp;nbsp;Are you able to see the print outs? &amp;nbsp;Are you able to step through the code and see the appropriate variables increment and decrement properly (ftmParam.uDutyCyclePercent)?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Chris&amp;nbsp;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 24 Aug 2016 13:26:28 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Kinetis-Microcontrollers/PWM-with-FTM-on-KW24D512/m-p/556635#M33717</guid>
      <dc:creator>chris_brown</dc:creator>
      <dc:date>2016-08-24T13:26:28Z</dc:date>
    </item>
    <item>
      <title>Re: PWM with FTM on KW24D512</title>
      <link>https://community.nxp.com/t5/Kinetis-Microcontrollers/PWM-with-FTM-on-KW24D512/m-p/556636#M33718</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;DIV class=""&gt;&lt;P&gt;Hi Chris,&lt;/P&gt;&lt;P&gt;Thank you for your reply Chris.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I'm using a KW24 TWR board (twrkw24d512) on IAR workbench&lt;/P&gt;&lt;/DIV&gt;&lt;DIV class=""&gt; &lt;/DIV&gt;&lt;DIV class=""&gt;Yes, the code is running.&lt;/DIV&gt;&lt;DIV class=""&gt;I can see the print out on the console:&lt;/DIV&gt;&lt;DIV class=""&gt;"Welcome to FTM example&lt;P&gt;&lt;/P&gt;See the change of LED brightness"&lt;/DIV&gt;&lt;DIV class=""&gt; &lt;/DIV&gt;&lt;DIV class=""&gt; &lt;/DIV&gt;&lt;DIV class=""&gt;I can step through the code and see the variable ftmParam.uDutyCyclePercent increasing and decreasing.&lt;/DIV&gt;&lt;DIV class=""&gt; &lt;/DIV&gt;&lt;DIV class=""&gt;If I configure PTD4 PGIO, I can set and clear it and the level is correct on the scope.&lt;/DIV&gt;&lt;DIV class=""&gt;If I pin mux PTD4 to alternate4 whitch is FTM0 channel4 nothing happens on PTD4 pin when ftm code example runs.&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Fabrice&lt;/P&gt;&lt;/DIV&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 24 Aug 2016 16:51:41 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Kinetis-Microcontrollers/PWM-with-FTM-on-KW24D512/m-p/556636#M33718</guid>
      <dc:creator>fabricetocci</dc:creator>
      <dc:date>2016-08-24T16:51:41Z</dc:date>
    </item>
    <item>
      <title>Re: PWM with FTM on KW24D512</title>
      <link>https://community.nxp.com/t5/Kinetis-Microcontrollers/PWM-with-FTM-on-KW24D512/m-p/556637#M33719</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Fabrice,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I have already tested this example together with TWR-KW24 with small changes in the code:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;#define BOARD_FTM_CHANNEL &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;STRONG&gt;4&lt;/STRONG&gt;&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;void configure_ftm_pins(uint32_t instance)&lt;/EM&gt;&lt;BR /&gt;&lt;EM&gt;{&lt;/EM&gt;&lt;BR /&gt;&lt;EM&gt; switch(instance) {&lt;/EM&gt;&lt;BR /&gt;&lt;EM&gt; case FTM0_IDX: /* FTM0 */&lt;/EM&gt;&lt;BR /&gt;&lt;EM&gt; /* Affects PORTD_PCR6 register */&lt;/EM&gt;&lt;BR /&gt;&lt;EM&gt; PORT_HAL_SetDriveStrengthMode(PORTD,&lt;STRONG&gt;4&lt;/STRONG&gt;u,kPortLowDriveStrength);&lt;/EM&gt;&lt;BR /&gt;&lt;EM&gt; PORT_HAL_SetMuxMode(PORTD,&lt;STRONG&gt;4&lt;/STRONG&gt;u,kPortMuxAlt4);&lt;/EM&gt;&lt;BR /&gt;&lt;EM&gt; PORT_HAL_SetSlewRateMode(PORTD,&lt;STRONG&gt;4&lt;/STRONG&gt;u,kPortSlowSlewRate);&lt;/EM&gt;&lt;BR /&gt;&lt;EM&gt; break;&lt;/EM&gt;&lt;BR /&gt;&lt;EM&gt; default:&lt;/EM&gt;&lt;BR /&gt;&lt;EM&gt; break;&lt;/EM&gt;&lt;BR /&gt;&lt;EM&gt; }&lt;/EM&gt;&lt;BR /&gt;&lt;EM&gt;}&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Everything works fine, I see the PWM signal on the pin PTA4 - J19 pin 2.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Best regards,&lt;BR /&gt;Pavel&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 25 Aug 2016 10:35:57 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Kinetis-Microcontrollers/PWM-with-FTM-on-KW24D512/m-p/556637#M33719</guid>
      <dc:creator>pavel_krenek</dc:creator>
      <dc:date>2016-08-25T10:35:57Z</dc:date>
    </item>
    <item>
      <title>Re: PWM with FTM on KW24D512</title>
      <link>https://community.nxp.com/t5/Kinetis-Microcontrollers/PWM-with-FTM-on-KW24D512/m-p/556638#M33720</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Pavel,&lt;/P&gt;&lt;P&gt;The example code for FTM works fine with your changes!&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thank's a lot.&lt;/P&gt;&lt;P&gt;Regards.&lt;/P&gt;&lt;P&gt;Fabrice.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 26 Aug 2016 09:13:49 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Kinetis-Microcontrollers/PWM-with-FTM-on-KW24D512/m-p/556638#M33720</guid>
      <dc:creator>fabricetocci</dc:creator>
      <dc:date>2016-08-26T09:13:49Z</dc:date>
    </item>
  </channel>
</rss>

