<?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: LPC 55s16 PWM in LPC Microcontrollers</title>
    <link>https://community.nxp.com/t5/LPC-Microcontrollers/LPC-55s16-PWM/m-p/1693067#M53595</link>
    <description>&lt;P&gt;I am using ctimer_pwm_interrupt_example demo.&lt;/P&gt;
&lt;P&gt;add&amp;nbsp;CLOCK_AttachClk(kMAIN_CLK_to_CTIMER2); after&amp;nbsp;BOARD_InitBootClocks();&lt;/P&gt;
&lt;P&gt;BOARD_InitBootPins();&lt;BR /&gt;BOARD_InitBootClocks();&lt;BR /&gt;&lt;STRONG&gt;CLOCK_AttachClk(kMAIN_CLK_to_CTIMER2);&lt;/STRONG&gt;&lt;BR /&gt;BOARD_InitDebugConsole();&lt;/P&gt;
&lt;P&gt;ctimer works well.&lt;/P&gt;
&lt;P&gt;Please test it.&lt;/P&gt;</description>
    <pubDate>Wed, 26 Jul 2023 12:22:30 GMT</pubDate>
    <dc:creator>ZhangJennie</dc:creator>
    <dc:date>2023-07-26T12:22:30Z</dc:date>
    <item>
      <title>LPC 55s16 PWM</title>
      <link>https://community.nxp.com/t5/LPC-Microcontrollers/LPC-55s16-PWM/m-p/1691049#M53528</link>
      <description>&lt;P&gt;HI&amp;nbsp; I am Trying to generate PWM pulse in LPC 55s16 MCU&amp;nbsp;&lt;/P&gt;&lt;P&gt;"clock was not working"&lt;/P&gt;&lt;P&gt;as per User manual&amp;nbsp;&lt;/P&gt;&lt;P&gt;Select clock source. See Section 4.5.27 “CTimer 0 clock source select” to&lt;BR /&gt;Section 4.5.31 “CTimer 4 clock source select register”&lt;/P&gt;&lt;P&gt;Table 68. CTimer 2 clock source select (CTIMERCLKSEL2, offset = 0x274) bit description&lt;/P&gt;&lt;P&gt;" SYSCON-&amp;gt;CTIMERCLKSELX[2] |= 0x00; " // CTimer 2 clock source select register .&lt;/P&gt;&lt;P&gt;but above register is not working.&lt;/P&gt;&lt;P&gt;So kindly update any correction in my configuration below&lt;/P&gt;&lt;P&gt;int main(void)&lt;BR /&gt;{&lt;BR /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;nbsp;&lt;BR /&gt;&amp;nbsp; SYSCON-&amp;gt;CTIMERCLKSELX[2] |= 0x00; // CTimer 2 clock source select register&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;IOCON-&amp;gt;PIO[1][6] = 0X003; // FUNC = 3 // CTIMER2_MAT1&lt;BR /&gt;SYSCON-&amp;gt;AHBCLKCTRLX[1] = 1 &amp;lt;&amp;lt; 22 ; // Enables the clock for the Timer 2.&lt;BR /&gt;SYSCON-&amp;gt;PRESETCTRLSET[1] = 1 &amp;lt;&amp;lt; 22 ; // Timer 2 reset control.&lt;BR /&gt;SYSCON-&amp;gt;PRESETCTRLCLR[1] = 1 &amp;lt;&amp;lt; 22 ; //clears the corresponding position in PRESETCTRL1.&lt;BR /&gt;CTIMER-&amp;gt;CTCR = 0X00;//Timer mode. Incremented every rising APB bus clock edge&lt;BR /&gt;CTIMER-&amp;gt;PR = 0X00;//The pre-scale counter is incremented on every APB bus clock&lt;BR /&gt;CTIMER-&amp;gt;PWMC = 1 &amp;lt;&amp;lt; 1 ;// PWM mode is enabled for CTIMERn_MAT1.&lt;BR /&gt;CTIMER-&amp;gt;MCR = 1 &amp;lt;&amp;lt; 10 ;// Reset on MR3: the TC will be reset if MR3 matches it.&lt;BR /&gt;CTIMER-&amp;gt;MR[3] = 96000000 ;&lt;BR /&gt;CTIMER-&amp;gt;MR[1] = 48000000 ;&lt;BR /&gt;CTIMER-&amp;gt;TCR |= 1 &amp;lt;&amp;lt; 0 ; //Enabled. The timer counter and pre-scale counter are enabled&lt;BR /&gt;while(1);&lt;BR /&gt;}&lt;/P&gt;</description>
      <pubDate>Mon, 24 Jul 2023 06:00:04 GMT</pubDate>
      <guid>https://community.nxp.com/t5/LPC-Microcontrollers/LPC-55s16-PWM/m-p/1691049#M53528</guid>
      <dc:creator>Arularasan</dc:creator>
      <dc:date>2023-07-24T06:00:04Z</dc:date>
    </item>
    <item>
      <title>Re: LPC 55s16 PWM</title>
      <link>https://community.nxp.com/t5/LPC-Microcontrollers/LPC-55s16-PWM/m-p/1691067#M53530</link>
      <description>&lt;P&gt;Hi &lt;a href="https://community.nxp.com/t5/user/viewprofilepage/user-id/211801"&gt;@Arularasan&lt;/a&gt; ,&lt;/P&gt;&lt;P&gt;have you checked the PWM example in the MCUXpresso SDK?&lt;/P&gt;</description>
      <pubDate>Mon, 24 Jul 2023 06:18:24 GMT</pubDate>
      <guid>https://community.nxp.com/t5/LPC-Microcontrollers/LPC-55s16-PWM/m-p/1691067#M53530</guid>
      <dc:creator>ErichStyger</dc:creator>
      <dc:date>2023-07-24T06:18:24Z</dc:date>
    </item>
    <item>
      <title>Re: LPC 55s16 PWM</title>
      <link>https://community.nxp.com/t5/LPC-Microcontrollers/LPC-55s16-PWM/m-p/1691086#M53532</link>
      <description>&lt;P&gt;&lt;a href="https://community.nxp.com/t5/user/viewprofilepage/user-id/17173"&gt;@ErichStyger&lt;/a&gt;&amp;nbsp; Yes, &lt;SPAN&gt;the PWM example in the MCUXpresso SDK is Working.&lt;/SPAN&gt;&lt;BR /&gt;But the driver configuration I write doesn't work...&lt;/P&gt;&lt;P&gt;what is the problem in these register&amp;nbsp; SYSCON-&amp;gt;CTIMERCLKSELX[2] |= 0x00; // CTimer 2 clock source select register&lt;/P&gt;&lt;P&gt;Please edit and update ....&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 24 Jul 2023 06:47:52 GMT</pubDate>
      <guid>https://community.nxp.com/t5/LPC-Microcontrollers/LPC-55s16-PWM/m-p/1691086#M53532</guid>
      <dc:creator>Arularasan</dc:creator>
      <dc:date>2023-07-24T06:47:52Z</dc:date>
    </item>
    <item>
      <title>Re: LPC 55s16 PWM</title>
      <link>https://community.nxp.com/t5/LPC-Microcontrollers/LPC-55s16-PWM/m-p/1691388#M53550</link>
      <description>&lt;P&gt;Hi&amp;nbsp;Arularasan&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Can you please let us know your SDK version and demo project with configurations?&lt;/P&gt;
&lt;P&gt;Thanks,&lt;/P&gt;
&lt;P&gt;Jun Zhang&lt;/P&gt;</description>
      <pubDate>Mon, 24 Jul 2023 12:23:29 GMT</pubDate>
      <guid>https://community.nxp.com/t5/LPC-Microcontrollers/LPC-55s16-PWM/m-p/1691388#M53550</guid>
      <dc:creator>ZhangJennie</dc:creator>
      <dc:date>2023-07-24T12:23:29Z</dc:date>
    </item>
    <item>
      <title>Re: LPC 55s16 PWM</title>
      <link>https://community.nxp.com/t5/LPC-Microcontrollers/LPC-55s16-PWM/m-p/1691833#M53561</link>
      <description>&lt;P&gt;&lt;SPAN&gt;1 . SDK version :&amp;nbsp;&lt;/SPAN&gt;&lt;STRONG&gt;SDK_2.X_LPC_Xpresso5&amp;nbsp; 2.13.0&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;2&amp;nbsp; .driver example : &lt;STRONG&gt;Ctimer_PWM_example&lt;/STRONG&gt;&amp;nbsp;&amp;nbsp;&lt;/P&gt;&lt;P&gt;3 .&lt;SPAN&gt;demo project with configurations are below&amp;nbsp;↓&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;"clock was not working"&lt;/P&gt;&lt;P&gt;as per User manual&amp;nbsp;&lt;/P&gt;&lt;P&gt;Select clock source. See Section 4.5.27 “CTimer 0 clock source select” to&lt;BR /&gt;Section 4.5.31 “CTimer 4 clock source select register”&lt;/P&gt;&lt;P&gt;Table 68. &lt;STRONG&gt;CTimer 2&lt;/STRONG&gt; clock source select (CTIMERCLKSEL2, offset = 0x274) bit description&lt;/P&gt;&lt;P&gt;" &lt;STRONG&gt;SYSCON-&amp;gt;CTIMERCLKSELX[2] |= 0x00&lt;/STRONG&gt;; " // CTimer 2 clock source select register .&lt;/P&gt;&lt;P&gt;but above register is not working.&lt;/P&gt;&lt;P&gt;So kindly update any correction in my configuration below&lt;/P&gt;&lt;P&gt;int main(void)&lt;BR /&gt;{&lt;BR /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;nbsp;&lt;BR /&gt;&amp;nbsp; &lt;STRONG&gt;SYSCON-&amp;gt;CTIMERCLKSELX[2] |= 0x00; // CTimer 2 clock source select register&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;IOCON-&amp;gt;PIO[1][6] = 0X003; // FUNC = 3 // CTIMER2_MAT1&lt;BR /&gt;SYSCON-&amp;gt;AHBCLKCTRLX[1] = 1 &amp;lt;&amp;lt; 22 ; // Enables the clock for the Timer 2.&lt;BR /&gt;SYSCON-&amp;gt;PRESETCTRLSET[1] = 1 &amp;lt;&amp;lt; 22 ; // Timer 2 reset control.&lt;BR /&gt;SYSCON-&amp;gt;PRESETCTRLCLR[1] = 1 &amp;lt;&amp;lt; 22 ; //clears the corresponding position in PRESETCTRL1.&lt;BR /&gt;CTIMER-&amp;gt;CTCR = 0X00;//Timer mode. Incremented every rising APB bus clock edge&lt;BR /&gt;CTIMER-&amp;gt;PR = 0X00;//The pre-scale counter is incremented on every APB bus clock&lt;BR /&gt;CTIMER-&amp;gt;PWMC = 1 &amp;lt;&amp;lt; 1 ;// PWM mode is enabled for CTIMERn_MAT1.&lt;BR /&gt;CTIMER-&amp;gt;MCR = 1 &amp;lt;&amp;lt; 10 ;// Reset on MR3: the TC will be reset if MR3 matches it.&lt;BR /&gt;CTIMER-&amp;gt;MR[3] = 96000000 ;&lt;BR /&gt;CTIMER-&amp;gt;MR[1] = 48000000 ;&lt;BR /&gt;CTIMER-&amp;gt;TCR |= 1 &amp;lt;&amp;lt; 0 ; //Enabled. The timer counter and pre-scale counter are enabled&lt;BR /&gt;while(1);&lt;BR /&gt;}&lt;/P&gt;</description>
      <pubDate>Tue, 25 Jul 2023 04:42:38 GMT</pubDate>
      <guid>https://community.nxp.com/t5/LPC-Microcontrollers/LPC-55s16-PWM/m-p/1691833#M53561</guid>
      <dc:creator>Arularasan</dc:creator>
      <dc:date>2023-07-25T04:42:38Z</dc:date>
    </item>
    <item>
      <title>Re: LPC 55s16 PWM</title>
      <link>https://community.nxp.com/t5/LPC-Microcontrollers/LPC-55s16-PWM/m-p/1692831#M53591</link>
      <description>&lt;P&gt;Hi&lt;/P&gt;
&lt;P&gt;So you want to change clock source as main clock&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="ZhangJennie_1-1690358068986.png" style="width: 400px;"&gt;&lt;img src="https://community.nxp.com/t5/image/serverpage/image-id/233657i2DDAE1FB9416B910/image-size/medium?v=v2&amp;amp;px=400" role="button" title="ZhangJennie_1-1690358068986.png" alt="ZhangJennie_1-1690358068986.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Thus configure the CTIMER2 clock source as main clock in clock configuration tool. try how it works.&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="ZhangJennie_0-1690358018291.png" style="width: 400px;"&gt;&lt;img src="https://community.nxp.com/t5/image/serverpage/image-id/233656iA0F97DD786FFFC69/image-size/medium?v=v2&amp;amp;px=400" role="button" title="ZhangJennie_0-1690358018291.png" alt="ZhangJennie_0-1690358018291.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;Have a nice day.&lt;/P&gt;
&lt;P&gt;Jun Zhang&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 26 Jul 2023 07:56:55 GMT</pubDate>
      <guid>https://community.nxp.com/t5/LPC-Microcontrollers/LPC-55s16-PWM/m-p/1692831#M53591</guid>
      <dc:creator>ZhangJennie</dc:creator>
      <dc:date>2023-07-26T07:56:55Z</dc:date>
    </item>
    <item>
      <title>Re: LPC 55s16 PWM</title>
      <link>https://community.nxp.com/t5/LPC-Microcontrollers/LPC-55s16-PWM/m-p/1692962#M53594</link>
      <description>&lt;P&gt;CTIMER2 clock source as main clock is not working .&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Arularasan_1-1690365057756.png" style="width: 400px;"&gt;&lt;img src="https://community.nxp.com/t5/image/serverpage/image-id/233691iC628B0EBB413C58E/image-size/medium?v=v2&amp;amp;px=400" role="button" title="Arularasan_1-1690365057756.png" alt="Arularasan_1-1690365057756.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 26 Jul 2023 09:54:32 GMT</pubDate>
      <guid>https://community.nxp.com/t5/LPC-Microcontrollers/LPC-55s16-PWM/m-p/1692962#M53594</guid>
      <dc:creator>Arularasan</dc:creator>
      <dc:date>2023-07-26T09:54:32Z</dc:date>
    </item>
    <item>
      <title>Re: LPC 55s16 PWM</title>
      <link>https://community.nxp.com/t5/LPC-Microcontrollers/LPC-55s16-PWM/m-p/1693067#M53595</link>
      <description>&lt;P&gt;I am using ctimer_pwm_interrupt_example demo.&lt;/P&gt;
&lt;P&gt;add&amp;nbsp;CLOCK_AttachClk(kMAIN_CLK_to_CTIMER2); after&amp;nbsp;BOARD_InitBootClocks();&lt;/P&gt;
&lt;P&gt;BOARD_InitBootPins();&lt;BR /&gt;BOARD_InitBootClocks();&lt;BR /&gt;&lt;STRONG&gt;CLOCK_AttachClk(kMAIN_CLK_to_CTIMER2);&lt;/STRONG&gt;&lt;BR /&gt;BOARD_InitDebugConsole();&lt;/P&gt;
&lt;P&gt;ctimer works well.&lt;/P&gt;
&lt;P&gt;Please test it.&lt;/P&gt;</description>
      <pubDate>Wed, 26 Jul 2023 12:22:30 GMT</pubDate>
      <guid>https://community.nxp.com/t5/LPC-Microcontrollers/LPC-55s16-PWM/m-p/1693067#M53595</guid>
      <dc:creator>ZhangJennie</dc:creator>
      <dc:date>2023-07-26T12:22:30Z</dc:date>
    </item>
  </channel>
</rss>

