<?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 PWM with MCPWM in LPC Microcontrollers</title>
    <link>https://community.nxp.com/t5/LPC-Microcontrollers/PWM-with-MCPWM/m-p/542506#M12493</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;STRONG&gt;Content originally posted in LPCWare by Thiapalm on Tue Nov 17 10:09:49 MST 2015&lt;/STRONG&gt;&lt;BR /&gt;&lt;SPAN&gt;Hello,&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;In LPCOpen, there is no driver for MCPWM, therefore I have imported a LPC43xx CMSIS driver (lpc43xx_mcpwm.c and lpc43xx_mcpwm.h) into my code with proper adaptations.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Is there any example code using that driver (or without it) to enable the PWM for MCOA1?? I am trying to use it for LED control.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;So far I am trying to:&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;1. Init the LPC_MCPWM -&amp;gt; MCPWM_Init(LPC_MCPWM);&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;2. PinMux -&amp;gt; Chip_SCU_PinMuxSet(0x9, 5, (SCU_MODE_INACT | SCU_MODE_FUNC1));&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;3. Set CLK_BASE_APB1 clock derived from CLKIN_MAINPLL&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;4. Mapping the periferal clock CLK_APB1_MOTOCON to CLK_BASE_APB1&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;5. Enabling CLK_APB1_MOTOCON&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;6. Config the channel:&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp; channelType = MCPWM_CHANNEL_CENTER_MODE;&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp; channelPolarity = MCPWM_CHANNEL_PASSIVE_HI;&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp; channelDeadtimeEnable = DISABLE;&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp; channelUpdateEnable = ENABLE;&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp; channelTimercounterValue = 0;&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp; channelPulsewidthValue = 100;&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp; channelPeriodValue = 18000;&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;5. Starting it&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;However, after the Pinmux, the LED lights up and stays on, even if I change the PulseWidth value.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Can someone help?&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Thx&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Wed, 15 Jun 2016 18:26:35 GMT</pubDate>
    <dc:creator>lpcware</dc:creator>
    <dc:date>2016-06-15T18:26:35Z</dc:date>
    <item>
      <title>PWM with MCPWM</title>
      <link>https://community.nxp.com/t5/LPC-Microcontrollers/PWM-with-MCPWM/m-p/542506#M12493</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;STRONG&gt;Content originally posted in LPCWare by Thiapalm on Tue Nov 17 10:09:49 MST 2015&lt;/STRONG&gt;&lt;BR /&gt;&lt;SPAN&gt;Hello,&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;In LPCOpen, there is no driver for MCPWM, therefore I have imported a LPC43xx CMSIS driver (lpc43xx_mcpwm.c and lpc43xx_mcpwm.h) into my code with proper adaptations.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Is there any example code using that driver (or without it) to enable the PWM for MCOA1?? I am trying to use it for LED control.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;So far I am trying to:&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;1. Init the LPC_MCPWM -&amp;gt; MCPWM_Init(LPC_MCPWM);&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;2. PinMux -&amp;gt; Chip_SCU_PinMuxSet(0x9, 5, (SCU_MODE_INACT | SCU_MODE_FUNC1));&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;3. Set CLK_BASE_APB1 clock derived from CLKIN_MAINPLL&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;4. Mapping the periferal clock CLK_APB1_MOTOCON to CLK_BASE_APB1&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;5. Enabling CLK_APB1_MOTOCON&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;6. Config the channel:&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp; channelType = MCPWM_CHANNEL_CENTER_MODE;&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp; channelPolarity = MCPWM_CHANNEL_PASSIVE_HI;&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp; channelDeadtimeEnable = DISABLE;&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp; channelUpdateEnable = ENABLE;&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp; channelTimercounterValue = 0;&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp; channelPulsewidthValue = 100;&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp; channelPeriodValue = 18000;&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;5. Starting it&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;However, after the Pinmux, the LED lights up and stays on, even if I change the PulseWidth value.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Can someone help?&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Thx&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 15 Jun 2016 18:26:35 GMT</pubDate>
      <guid>https://community.nxp.com/t5/LPC-Microcontrollers/PWM-with-MCPWM/m-p/542506#M12493</guid>
      <dc:creator>lpcware</dc:creator>
      <dc:date>2016-06-15T18:26:35Z</dc:date>
    </item>
  </channel>
</rss>

