<?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 Microcontrollers中的主题 simple PWM example for KL1x ?</title>
    <link>https://community.nxp.com/t5/Kinetis-Microcontrollers/simple-PWM-example-for-KL1x/m-p/445432#M26286</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;New to Kinetis. I am using KDS 3.0.0 and KSDK 1.2.0, with Processor Expert 3.0.1. My target is in the MKL1x family.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;So far I can name and configure output pins, and control them with&lt;STRONG&gt; GPIO_DRV_SetPinOutput()&lt;/STRONG&gt; and &lt;STRONG&gt;GPIO_DRV_ClearPinOutput()&lt;/STRONG&gt;.&amp;nbsp; I am hoping there is something at a similar level for PWM, so that for example, after using &lt;STRONG&gt;TPM0:Init_TPM&lt;/STRONG&gt; in Processor Expert to configure the timer (setting clock source, modulo count, pin output for each channel, etc.) , there is some call like &lt;STRONG&gt;PWM_SetDuty(timer, channel, value)&lt;/STRONG&gt; to set the duty cycle. Can I do that?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The only Kinetis code examples I have found online do not use Processor Expert, or use some (older?) version that apparently has a PWM module.&amp;nbsp; This page &lt;A href="http://mcuoneclipse.com/2013/03/16/pwm-for-processor-expert-explained/" title="http://mcuoneclipse.com/2013/03/16/pwm-for-processor-expert-explained/"&gt;Tutorial: PWM with Processor Expert | MCU on Eclipse&lt;/A&gt;&amp;nbsp;&amp;nbsp; shows PE has a PWM module, but nothing with "PWM" in the name appears in PE for me.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt; I found this: &lt;A href="http://www.freescale.com/webapp/sps/download/license.jsp?colCode=FRDM-KL25Z-TPM-PWM" title="http://www.freescale.com/webapp/sps/download/license.jsp?colCode=FRDM-KL25Z-TPM-PWM"&gt;Example code on how to configure the TPM as PWM in the FRDM-KL25 board&lt;/A&gt;&lt;/P&gt;&lt;P&gt; which uses &lt;STRONG&gt;set_TPM_CnV(TPM1_BASE_PTR, 0, DUTY_CYCLE); &lt;/STRONG&gt; but is this function documented anywhere? Google says there is exactly one web page online containing "set_TPM_CnV" and it's in Czech...&amp;nbsp; Any assistance would be welcomed!&amp;nbsp; Thanks.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Fri, 30 Oct 2015 22:19:04 GMT</pubDate>
    <dc:creator>johnbeale</dc:creator>
    <dc:date>2015-10-30T22:19:04Z</dc:date>
    <item>
      <title>simple PWM example for KL1x ?</title>
      <link>https://community.nxp.com/t5/Kinetis-Microcontrollers/simple-PWM-example-for-KL1x/m-p/445432#M26286</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;New to Kinetis. I am using KDS 3.0.0 and KSDK 1.2.0, with Processor Expert 3.0.1. My target is in the MKL1x family.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;So far I can name and configure output pins, and control them with&lt;STRONG&gt; GPIO_DRV_SetPinOutput()&lt;/STRONG&gt; and &lt;STRONG&gt;GPIO_DRV_ClearPinOutput()&lt;/STRONG&gt;.&amp;nbsp; I am hoping there is something at a similar level for PWM, so that for example, after using &lt;STRONG&gt;TPM0:Init_TPM&lt;/STRONG&gt; in Processor Expert to configure the timer (setting clock source, modulo count, pin output for each channel, etc.) , there is some call like &lt;STRONG&gt;PWM_SetDuty(timer, channel, value)&lt;/STRONG&gt; to set the duty cycle. Can I do that?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The only Kinetis code examples I have found online do not use Processor Expert, or use some (older?) version that apparently has a PWM module.&amp;nbsp; This page &lt;A href="http://mcuoneclipse.com/2013/03/16/pwm-for-processor-expert-explained/" title="http://mcuoneclipse.com/2013/03/16/pwm-for-processor-expert-explained/"&gt;Tutorial: PWM with Processor Expert | MCU on Eclipse&lt;/A&gt;&amp;nbsp;&amp;nbsp; shows PE has a PWM module, but nothing with "PWM" in the name appears in PE for me.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt; I found this: &lt;A href="http://www.freescale.com/webapp/sps/download/license.jsp?colCode=FRDM-KL25Z-TPM-PWM" title="http://www.freescale.com/webapp/sps/download/license.jsp?colCode=FRDM-KL25Z-TPM-PWM"&gt;Example code on how to configure the TPM as PWM in the FRDM-KL25 board&lt;/A&gt;&lt;/P&gt;&lt;P&gt; which uses &lt;STRONG&gt;set_TPM_CnV(TPM1_BASE_PTR, 0, DUTY_CYCLE); &lt;/STRONG&gt; but is this function documented anywhere? Google says there is exactly one web page online containing "set_TPM_CnV" and it's in Czech...&amp;nbsp; Any assistance would be welcomed!&amp;nbsp; Thanks.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 30 Oct 2015 22:19:04 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Kinetis-Microcontrollers/simple-PWM-example-for-KL1x/m-p/445432#M26286</guid>
      <dc:creator>johnbeale</dc:creator>
      <dc:date>2015-10-30T22:19:04Z</dc:date>
    </item>
    <item>
      <title>Re: simple PWM example for KL1x ?</title>
      <link>https://community.nxp.com/t5/Kinetis-Microcontrollers/simple-PWM-example-for-KL1x/m-p/445433#M26287</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi, John,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;This is the code for TPM module based on KL02Z. You can refer to it. 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>Mon, 02 Nov 2015 07:06:53 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Kinetis-Microcontrollers/simple-PWM-example-for-KL1x/m-p/445433#M26287</guid>
      <dc:creator>xiangjun_rong</dc:creator>
      <dc:date>2015-11-02T07:06:53Z</dc:date>
    </item>
    <item>
      <title>Re: simple PWM example for KL1x ?</title>
      <link>https://community.nxp.com/t5/Kinetis-Microcontrollers/simple-PWM-example-for-KL1x/m-p/445434#M26288</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I found a demo "simple_pwm" that the uses the PWM with the board's LEDs&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks for the help.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Bruce&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 19 Oct 2018 22:42:11 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Kinetis-Microcontrollers/simple-PWM-example-for-KL1x/m-p/445434#M26288</guid>
      <dc:creator>bgraham</dc:creator>
      <dc:date>2018-10-19T22:42:11Z</dc:date>
    </item>
  </channel>
</rss>

