<?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: Four PWM outputs using KSDK fsl_ftm  in Kinetis Software Development Kit</title>
    <link>https://community.nxp.com/t5/Kinetis-Software-Development-Kit/Four-PWM-outputs-using-KSDK-fsl-ftm/m-p/547249#M5609</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello Xiangjun using capture was done, that’s not my question it was only example that it is not supported by fsl_ftm. It has been already implemented successfully  &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I want to know if four PWM’s with deferent PW can be done using fsl_ftm without using init_ftm or direct FTM registers configuration.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The question is if there is any limitation to do it using fsl_ftm only?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The problem is how to configure the fsl_ftm &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;In following images you can see my not working configuration.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt; &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt; &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt; &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Shaul&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Wed, 24 Aug 2016 05:43:22 GMT</pubDate>
    <dc:creator>shauldorf</dc:creator>
    <dc:date>2016-08-24T05:43:22Z</dc:date>
    <item>
      <title>Four PWM outputs using KSDK fsl_ftm</title>
      <link>https://community.nxp.com/t5/Kinetis-Software-Development-Kit/Four-PWM-outputs-using-KSDK-fsl-ftm/m-p/547245#M5605</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I need an application/demo how to use “fsl_ftm” component to generate four(4) PWM signals with the same&lt;BR /&gt;frequency and different Pulse-Widths (100 Hz &amp;amp; PW 50%, 40%, 30% and 20%).&lt;/P&gt;&lt;P&gt;Based on this configuration I want to use some of the methods to change Frequency and Pulse-Width&lt;BR /&gt;during program run time.&lt;/P&gt;&lt;P&gt;I’m using FRDM-K64 + KDS 3.2 , KSDK 1.3 and &lt;SPAN style="text-decoration: underline;"&gt;Processor Expert&lt;/SPAN&gt;.&lt;/P&gt;&lt;P&gt;When I use “init_ftm” component or direct FTM register configuration (based onApplication Note AN5142)&lt;BR /&gt;it works successfully, but when I try to use “fsl_ftm” something is wrong and I get only single output on CH0.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 22 Aug 2016 18:43:27 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Kinetis-Software-Development-Kit/Four-PWM-outputs-using-KSDK-fsl-ftm/m-p/547245#M5605</guid>
      <dc:creator>shauldorf</dc:creator>
      <dc:date>2016-08-22T18:43:27Z</dc:date>
    </item>
    <item>
      <title>Re: Four PWM outputs using KSDK fsl_ftm</title>
      <link>https://community.nxp.com/t5/Kinetis-Software-Development-Kit/Four-PWM-outputs-using-KSDK-fsl-ftm/m-p/547246#M5606</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi, Shaul,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I suggest you use SDK2.0 instead of SDK1.3 based on FRDM_K64, the SDK2.0 is simpler than SDK1.3 and easy to understand.&lt;/P&gt;&lt;P&gt;You can download SDK2.0 from the website:&lt;/P&gt;&lt;P&gt;&lt;A href="https://kex.nxp.com/en/welcome" title="https://kex.nxp.com/en/welcome"&gt;Welcome to Kinetis Expert | Kinetis Expert&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Theer is an example for FTM, pls refer to the example in the directory:&lt;/P&gt;&lt;P&gt;C:\Freescale\SDK2.0_K64F\boards\frdmk64f\demo_apps\bubble&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The example uses two two channels, if you want to use 4 channels, pls refer to the attached bubble.c&lt;/P&gt;&lt;P&gt;BR&lt;/P&gt;&lt;P&gt;Xiangjun Rong&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 23 Aug 2016 06:06:43 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Kinetis-Software-Development-Kit/Four-PWM-outputs-using-KSDK-fsl-ftm/m-p/547246#M5606</guid>
      <dc:creator>xiangjun_rong</dc:creator>
      <dc:date>2016-08-23T06:06:43Z</dc:date>
    </item>
    <item>
      <title>Re: Four PWM outputs using KSDK fsl_ftm</title>
      <link>https://community.nxp.com/t5/Kinetis-Software-Development-Kit/Four-PWM-outputs-using-KSDK-fsl-ftm/m-p/547247#M5607</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello &lt;SPAN lang="EN" style="color: #51626f; line-height: 115%; font-family: 'Arial','sans-serif'; font-size: 10.5pt; mso-ansi-language: EN;"&gt;Xiangjun and Thanks,&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN lang="EN" style="color: #51626f; line-height: 115%; font-family: 'Arial','sans-serif'; font-size: 10.5pt; mso-ansi-language: EN;"&gt;Using “init_ftm” was quite simple. &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN lang="EN" style="color: #51626f; line-height: 115%; font-family: 'Arial','sans-serif'; font-size: 10.5pt; mso-ansi-language: EN;"&gt;My idea was to stay with Processor Expert and KSDK1.3.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN lang="EN" style="color: #51626f; line-height: 115%; font-family: 'Arial','sans-serif'; font-size: 10.5pt; mso-ansi-language: EN;"&gt;My question is if it can be done using an “fsl_ftm” (configure four PWM’s).&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN lang="EN" style="color: #51626f; line-height: 115%; font-family: 'Arial','sans-serif'; font-size: 10.5pt; mso-ansi-language: EN;"&gt;Based on my earlier test this component (fsl_ftm) can’t be used to configured to capture input.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN lang="EN" style="color: #51626f; line-height: 115%; font-family: 'Arial','sans-serif'; font-size: 10.5pt; mso-ansi-language: EN;"&gt;NXP solution suggested by Alice Yang (NXP) was to use “int_ftm” to do the capture configuration and&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN lang="EN" style="color: #51626f; line-height: 115%; font-family: 'Arial','sans-serif'; font-size: 10.5pt; mso-ansi-language: EN;"&gt; in all rest of my code I didn’t use the component &lt;SPAN lang="EN" style="color: #51626f; line-height: 115%; font-family: 'Arial','sans-serif'; font-size: 10.5pt; mso-ansi-language: EN; mso-fareast-font-family: Calibri; mso-fareast-theme-font: minor-latin; mso-fareast-language: EN-US; mso-bidi-language: HE;"&gt;methods&lt;/SPAN&gt;.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN lang="EN" style="color: #51626f; line-height: 115%; font-family: 'Arial','sans-serif'; font-size: 10.5pt; mso-ansi-language: EN;"&gt; &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN lang="EN" style="color: #51626f; line-height: 115%; font-family: 'Arial','sans-serif'; font-size: 10.5pt; mso-ansi-language: EN;"&gt;I’m considering to move to KSDK 2.x but is it needed now, or to wait and see what will be included in new release that&lt;BR /&gt;will replace PE.&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN lang="EN" style="color: #51626f; line-height: 115%; font-family: 'Arial','sans-serif'; font-size: 10.5pt; mso-ansi-language: EN;"&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN lang="EN" style="color: #51626f; line-height: 115%; font-family: 'Arial','sans-serif'; font-size: 10.5pt; mso-ansi-language: EN;"&gt;BR&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN lang="EN" style="color: #51626f; line-height: 115%; font-family: 'Arial','sans-serif'; font-size: 10.5pt; mso-ansi-language: EN;"&gt;Shaul Dorf&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 23 Aug 2016 07:00:17 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Kinetis-Software-Development-Kit/Four-PWM-outputs-using-KSDK-fsl-ftm/m-p/547247#M5607</guid>
      <dc:creator>shauldorf</dc:creator>
      <dc:date>2016-08-23T07:00:17Z</dc:date>
    </item>
    <item>
      <title>Re: Four PWM outputs using KSDK fsl_ftm</title>
      <link>https://community.nxp.com/t5/Kinetis-Software-Development-Kit/Four-PWM-outputs-using-KSDK-fsl-ftm/m-p/547248#M5608</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi, Shaul,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If you develop FTM code, it is okay to use PE, SDK or writting FTM register directly as an5142, all of them can implement your application. But If you want to use SDK, I suggest you use the latest SDK2.0 instead of SDK1.3, the SDK2.0 is simpler and easy to understand.&lt;/P&gt;&lt;P&gt;for&amp;nbsp; capture function, you should connect the external signal to FTM_CHx pin, and use the following function to configure the FTM pin in capture mode. in the ISR of FTM, you can read the FTM_CnV register. When the predefined edge of external signal on the FTM_CHx is detected, the current FTM counter value is latched to FTM_CnV register, at the same time, an interrupt of FTM happens.&lt;/P&gt;&lt;P&gt;Hope it can help you.&lt;/P&gt;&lt;P&gt;BR&lt;/P&gt;&lt;P&gt;Xiangjun rong&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;SDK2.0 capture function:&lt;/P&gt;&lt;P&gt;@brief Enables capturing an input signal on the channel using the function parameters.&lt;BR /&gt;&amp;nbsp;*&lt;BR /&gt;&amp;nbsp;* When the edge specified in the captureMode argument occurs on the channel, the FTM counter is&lt;BR /&gt;&amp;nbsp;* captured into the CnV register. The user has to read the CnV register separately to get this&lt;BR /&gt;&amp;nbsp;* value. The filter function is disabled if the filterVal argument passed in is 0. The filter&lt;BR /&gt;&amp;nbsp;* function is available only for channels 0, 1, 2, 3.&lt;BR /&gt;&amp;nbsp;*&lt;BR /&gt;&amp;nbsp;* @param base&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; FTM peripheral base address&lt;BR /&gt;&amp;nbsp;* @param chnlNumber&amp;nbsp; The channel number&lt;BR /&gt;&amp;nbsp;* @param captureMode Specifies which edge to capture&lt;BR /&gt;&amp;nbsp;* @param filterValue Filter value, specify 0 to disable filter. Available only for channels 0-3.&lt;BR /&gt;&amp;nbsp;*/&lt;BR /&gt;void FTM_SetupInputCapture(FTM_Type *base,&lt;BR /&gt;&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;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; ftm_chnl_t chnlNumber,&lt;BR /&gt;&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;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; ftm_input_capture_edge_t captureMode,&lt;BR /&gt;&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;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; uint32_t filterValue);&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 24 Aug 2016 03:04:26 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Kinetis-Software-Development-Kit/Four-PWM-outputs-using-KSDK-fsl-ftm/m-p/547248#M5608</guid>
      <dc:creator>xiangjun_rong</dc:creator>
      <dc:date>2016-08-24T03:04:26Z</dc:date>
    </item>
    <item>
      <title>Re: Four PWM outputs using KSDK fsl_ftm</title>
      <link>https://community.nxp.com/t5/Kinetis-Software-Development-Kit/Four-PWM-outputs-using-KSDK-fsl-ftm/m-p/547249#M5609</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello Xiangjun using capture was done, that’s not my question it was only example that it is not supported by fsl_ftm. It has been already implemented successfully  &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I want to know if four PWM’s with deferent PW can be done using fsl_ftm without using init_ftm or direct FTM registers configuration.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The question is if there is any limitation to do it using fsl_ftm only?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The problem is how to configure the fsl_ftm &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;In following images you can see my not working configuration.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt; &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt; &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt; &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Shaul&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 24 Aug 2016 05:43:22 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Kinetis-Software-Development-Kit/Four-PWM-outputs-using-KSDK-fsl-ftm/m-p/547249#M5609</guid>
      <dc:creator>shauldorf</dc:creator>
      <dc:date>2016-08-24T05:43:22Z</dc:date>
    </item>
  </channel>
</rss>

