<?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>Kinetis Software Development KitのトピックRe: How to set Timer PWM Module for controlling ESC?</title>
    <link>https://community.nxp.com/t5/Kinetis-Software-Development-Kit/How-to-set-Timer-PWM-Module-for-controlling-ESC/m-p/532401#M5528</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thanks a lot for your answer. I will use different processor for my project but I want to check if it is possible to generate 50Hz (20ms period) pwm signal (because such signal use esc controllers ). I changed the period in &lt;SPAN style="color: #253555; font-family: 'Helvetica Neue', Helvetica, Arial, sans-serif; font-size: 14px; font-weight: bold; background-color: #e2e8f2;"&gt;TPM_SetupPwm()&lt;/SPAN&gt; and I can generate only 400Hz as the smallest. It's normal for TPM and I need FTM to generate 50Hz?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Mon, 04 Jul 2016 15:04:36 GMT</pubDate>
    <dc:creator>jangajos</dc:creator>
    <dc:date>2016-07-04T15:04:36Z</dc:date>
    <item>
      <title>How to set Timer PWM Module for controlling ESC?</title>
      <link>https://community.nxp.com/t5/Kinetis-Software-Development-Kit/How-to-set-Timer-PWM-Module-for-controlling-ESC/m-p/532399#M5526</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi, I try to set PWM for esc brushless motor which work on 50Hz by using sdk 2.0&amp;nbsp; and simply pwm example I couldn't achieve it. Could someone post how to configure it?&lt;/P&gt;&lt;P style="min-height: 8pt; padding: 0px;"&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I use FRDM KL26Z.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 01 Jul 2016 20:23:03 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Kinetis-Software-Development-Kit/How-to-set-Timer-PWM-Module-for-controlling-ESC/m-p/532399#M5526</guid>
      <dc:creator>jangajos</dc:creator>
      <dc:date>2016-07-01T20:23:03Z</dc:date>
    </item>
    <item>
      <title>Re: How to set Timer PWM Module for controlling ESC?</title>
      <link>https://community.nxp.com/t5/Kinetis-Software-Development-Kit/How-to-set-Timer-PWM-Module-for-controlling-ESC/m-p/532400#M5527</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi, Jan,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If you would like to control a BLDC, I suggest you use a Kinetis processor with FTM module instead of TPM, as you know that the PWM generator module should have inverting/masking function when you control a BLDC motor, BTW, the PWM generator should have Fault function in order to disable pwm signals once over cruuent/voltage occur, but the TPM module is difficult to implement the above function.&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>Mon, 04 Jul 2016 09:13:32 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Kinetis-Software-Development-Kit/How-to-set-Timer-PWM-Module-for-controlling-ESC/m-p/532400#M5527</guid>
      <dc:creator>xiangjun_rong</dc:creator>
      <dc:date>2016-07-04T09:13:32Z</dc:date>
    </item>
    <item>
      <title>Re: How to set Timer PWM Module for controlling ESC?</title>
      <link>https://community.nxp.com/t5/Kinetis-Software-Development-Kit/How-to-set-Timer-PWM-Module-for-controlling-ESC/m-p/532401#M5528</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thanks a lot for your answer. I will use different processor for my project but I want to check if it is possible to generate 50Hz (20ms period) pwm signal (because such signal use esc controllers ). I changed the period in &lt;SPAN style="color: #253555; font-family: 'Helvetica Neue', Helvetica, Arial, sans-serif; font-size: 14px; font-weight: bold; background-color: #e2e8f2;"&gt;TPM_SetupPwm()&lt;/SPAN&gt; and I can generate only 400Hz as the smallest. It's normal for TPM and I need FTM to generate 50Hz?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 04 Jul 2016 15:04:36 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Kinetis-Software-Development-Kit/How-to-set-Timer-PWM-Module-for-controlling-ESC/m-p/532401#M5528</guid>
      <dc:creator>jangajos</dc:creator>
      <dc:date>2016-07-04T15:04:36Z</dc:date>
    </item>
    <item>
      <title>Re: How to set Timer PWM Module for controlling ESC?</title>
      <link>https://community.nxp.com/t5/Kinetis-Software-Development-Kit/How-to-set-Timer-PWM-Module-for-controlling-ESC/m-p/532402#M5529</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi, Jan,&lt;/P&gt;&lt;P&gt;As you know that the PWM is a divider, the TPM_MOD register is 16 bits register, it's maximum value is 65535. If you use 48MHz clock to drive TPM module, set TPM in edge-alignment mode, and set the PS bits in 3b'111, the mimimum PWM signal frequency is 48MHz/(128*65535)=5.72Hz.&lt;/P&gt;&lt;P&gt;If you want to generate 50HZ PWM signal in edge-alignment mode, assume that you use 48MHz clock signal to drive TPM module and set the PS bits in TPMx_SC as 3b'111(128 divider).&lt;/P&gt;&lt;P&gt;48MHz/(128*50)=7500&lt;/P&gt;&lt;P&gt;In other words, in the condition:edge-alignment mode, TPM driving clock is 48MHz, set the PS bits in TPM_SC as 111 in binary, set the TPM_MOD as 7500, you will get 50HZ PWM signal.&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;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 05 Jul 2016 03:30:51 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Kinetis-Software-Development-Kit/How-to-set-Timer-PWM-Module-for-controlling-ESC/m-p/532402#M5529</guid>
      <dc:creator>xiangjun_rong</dc:creator>
      <dc:date>2016-07-05T03:30:51Z</dc:date>
    </item>
    <item>
      <title>Re: How to set Timer PWM Module for controlling ESC?</title>
      <link>https://community.nxp.com/t5/Kinetis-Software-Development-Kit/How-to-set-Timer-PWM-Module-for-controlling-ESC/m-p/532403#M5530</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;You can use the following code:&lt;/P&gt;&lt;P&gt; TPM_GetDefaultConfig(&amp;amp;tpmInfo);&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; /* Initialize TPM module */&lt;/P&gt;&lt;P&gt;tpmInfo.prescale = kTPM_Prescale_Divide_128;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; TPM_Init(BOARD_TPM_BASEADDR, &amp;amp;tpmInfo);&lt;/P&gt;&lt;P&gt;PM_SetupPwm(BOARD_TPM_BASEADDR, tpmParam, 2U, kTPM_EdgeAlignedPwm, 50U, TPM_SOURCE_CLOCK);&lt;/P&gt;&lt;P&gt;&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, 05 Jul 2016 05:45:58 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Kinetis-Software-Development-Kit/How-to-set-Timer-PWM-Module-for-controlling-ESC/m-p/532403#M5530</guid>
      <dc:creator>xiangjun_rong</dc:creator>
      <dc:date>2016-07-05T05:45:58Z</dc:date>
    </item>
    <item>
      <title>Re: How to set Timer PWM Module for controlling ESC?</title>
      <link>https://community.nxp.com/t5/Kinetis-Software-Development-Kit/How-to-set-Timer-PWM-Module-for-controlling-ESC/m-p/532404#M5531</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi, &lt;BR /&gt;thanks for your help, now it works probably the problem was with prescaler because everything else i have the same :smileywink: thanks for the explanation :smileyhappy:&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 05 Jul 2016 20:48:20 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Kinetis-Software-Development-Kit/How-to-set-Timer-PWM-Module-for-controlling-ESC/m-p/532404#M5531</guid>
      <dc:creator>jangajos</dc:creator>
      <dc:date>2016-07-05T20:48:20Z</dc:date>
    </item>
  </channel>
</rss>

