<?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>LPC MicrocontrollersのトピックRe: PWM CONFIGURATION IN LPC 804</title>
    <link>https://community.nxp.com/t5/LPC-Microcontrollers/PWM-CONFIGURATION-IN-LPC-804/m-p/1675060#M53202</link>
    <description>&lt;P class="lia-align-justify"&gt;Hello &lt;a href="https://community.nxp.com/t5/user/viewprofilepage/user-id/211801"&gt;@Arularasan&lt;/a&gt;,&lt;/P&gt;
&lt;P class="lia-align-justify"&gt;Could you please try out using the following arrangement to your code?&lt;/P&gt;
&lt;LI-CODE lang="markup"&gt;.
CTIMER-&amp;gt;PR = 0X00; 
CTIMER-&amp;gt;PWMC |= 1&amp;lt;&amp;lt;3;
CTIMER-&amp;gt;MCR |= 1 &amp;lt;&amp;lt; 9 | 1 &amp;lt;&amp;lt; 10 | 1 &amp;lt;&amp;lt; 27 | 1 &amp;lt;&amp;lt; 0 | 1 &amp;lt;&amp;lt; 1;
CTIMER-&amp;gt;MR[0] =5000;
CTIMER-&amp;gt;MR[3] =10000;
CTIMER-&amp;gt;TCR |= 1&amp;lt;&amp;lt;0 ;
.&lt;/LI-CODE&gt;
&lt;P class="lia-align-justify"&gt;Also, there is a similar question on this post: &lt;A href="https://community.nxp.com/t5/LPC-Microcontrollers/LPC804-PWM-pulse-generation/m-p/1674188/highlight/false#M53174" target="_blank"&gt;LPC804 - PWM pulse generation - NXP Community&lt;/A&gt;, could you please take a look at it?&lt;/P&gt;
&lt;P class="lia-align-justify"&gt;Best regards, Raul.&lt;/P&gt;</description>
    <pubDate>Fri, 23 Jun 2023 16:46:26 GMT</pubDate>
    <dc:creator>RaRo</dc:creator>
    <dc:date>2023-06-23T16:46:26Z</dc:date>
    <item>
      <title>PWM CONFIGURATION IN LPC 804</title>
      <link>https://community.nxp.com/t5/LPC-Microcontrollers/PWM-CONFIGURATION-IN-LPC-804/m-p/1673736#M53164</link>
      <description>&lt;P&gt;PWM configuration not working!&lt;/P&gt;&lt;P&gt;I need to configure MR3 as period and MR0 as duty cycle&lt;/P&gt;&lt;P&gt;(50 % on time 50 % off time continuous pulse)&lt;/P&gt;&lt;P&gt;Is there any correction in my configuration below&lt;/P&gt;&lt;DIV&gt;int main(void)&lt;/DIV&gt;&lt;DIV&gt;{&lt;/DIV&gt;&lt;DIV&gt;SYSCON-&amp;gt;SYSAHBCLKCTRL0 |=&amp;nbsp; 1 &amp;lt;&amp;lt; 25 ;&amp;nbsp; // Enables clock for CTIMER0.&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;SYSCON-&amp;gt;PRESETCTRL0 |= 1 &amp;lt;&amp;lt; 25;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;//&amp;nbsp; CTIMER reset control // Clear the CTIMER reset.&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;SYSCON-&amp;gt;SYSAHBCLKCTRL0 |= 1&amp;lt;&amp;lt;7;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; //Enables clock for switch matrix&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;&amp;nbsp;SWM0-&amp;gt;PINASSIGN.PINASSIGN4 = (0X18) &amp;lt;&amp;lt; 24 ;&amp;nbsp; &amp;nbsp;//0X18;// P0_24 PIN SELECTED&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;&amp;nbsp;SYSCON-&amp;gt;SYSAHBCLKCTRL0 &amp;amp;= ~(1&amp;lt;&amp;lt;7); //DISABLE clock for switch matrix.&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;CTIMER-&amp;gt;TCR |= 1 &amp;lt;&amp;lt; 1;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; //The Timer Counter and the Presale Counter are synchronously&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; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; reset on the next positive edge of the APB bus clock&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;CTIMER-&amp;gt;PR = 0X00;&amp;nbsp; //Presale counter value&lt;/DIV&gt;&lt;DIV&gt;CTIMER-&amp;gt;MCR |= 1 &amp;lt;&amp;lt; 9 | 1 &amp;lt;&amp;lt; 10 | 1 &amp;lt;&amp;lt; 27 | 1 &amp;lt;&amp;lt; 0 | 1 &amp;lt;&amp;lt; 1;&lt;/DIV&gt;&lt;DIV&gt;CTIMER-&amp;gt;MR[3] =10000;//Timer counter match value&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;CTIMER-&amp;gt;MSR[3]=10000; //Timer counter match shadow value&lt;/DIV&gt;&lt;DIV&gt;CTIMER-&amp;gt;MR[0] =5000;//Timer counter match value&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;CTIMER-&amp;gt;MSR[0]=5000; //Timer counter match shadow value&lt;/DIV&gt;&lt;DIV&gt;CTIMER-&amp;gt;PWMC |= 1&amp;lt;&amp;lt;3;//PWM. PWM mode is enabled for CTIMER_MAT0.&lt;/DIV&gt;&lt;DIV&gt;CTIMER-&amp;gt;TCR |= 1&amp;lt;&amp;lt;0 ;//Enabled. The Timer Counter and Presale Counter are enabled&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp; while(1);&lt;/DIV&gt;&lt;DIV&gt;}&lt;/DIV&gt;</description>
      <pubDate>Wed, 21 Jun 2023 15:17:29 GMT</pubDate>
      <guid>https://community.nxp.com/t5/LPC-Microcontrollers/PWM-CONFIGURATION-IN-LPC-804/m-p/1673736#M53164</guid>
      <dc:creator>Arularasan</dc:creator>
      <dc:date>2023-06-21T15:17:29Z</dc:date>
    </item>
    <item>
      <title>Re: PWM CONFIGURATION IN LPC 804</title>
      <link>https://community.nxp.com/t5/LPC-Microcontrollers/PWM-CONFIGURATION-IN-LPC-804/m-p/1675060#M53202</link>
      <description>&lt;P class="lia-align-justify"&gt;Hello &lt;a href="https://community.nxp.com/t5/user/viewprofilepage/user-id/211801"&gt;@Arularasan&lt;/a&gt;,&lt;/P&gt;
&lt;P class="lia-align-justify"&gt;Could you please try out using the following arrangement to your code?&lt;/P&gt;
&lt;LI-CODE lang="markup"&gt;.
CTIMER-&amp;gt;PR = 0X00; 
CTIMER-&amp;gt;PWMC |= 1&amp;lt;&amp;lt;3;
CTIMER-&amp;gt;MCR |= 1 &amp;lt;&amp;lt; 9 | 1 &amp;lt;&amp;lt; 10 | 1 &amp;lt;&amp;lt; 27 | 1 &amp;lt;&amp;lt; 0 | 1 &amp;lt;&amp;lt; 1;
CTIMER-&amp;gt;MR[0] =5000;
CTIMER-&amp;gt;MR[3] =10000;
CTIMER-&amp;gt;TCR |= 1&amp;lt;&amp;lt;0 ;
.&lt;/LI-CODE&gt;
&lt;P class="lia-align-justify"&gt;Also, there is a similar question on this post: &lt;A href="https://community.nxp.com/t5/LPC-Microcontrollers/LPC804-PWM-pulse-generation/m-p/1674188/highlight/false#M53174" target="_blank"&gt;LPC804 - PWM pulse generation - NXP Community&lt;/A&gt;, could you please take a look at it?&lt;/P&gt;
&lt;P class="lia-align-justify"&gt;Best regards, Raul.&lt;/P&gt;</description>
      <pubDate>Fri, 23 Jun 2023 16:46:26 GMT</pubDate>
      <guid>https://community.nxp.com/t5/LPC-Microcontrollers/PWM-CONFIGURATION-IN-LPC-804/m-p/1675060#M53202</guid>
      <dc:creator>RaRo</dc:creator>
      <dc:date>2023-06-23T16:46:26Z</dc:date>
    </item>
  </channel>
</rss>

