<?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: LPC55S06 100Hz PWM with dutycycle change in LPC Microcontrollers</title>
    <link>https://community.nxp.com/t5/LPC-Microcontrollers/LPC55S06-100Hz-PWM-with-dutycycle-change/m-p/1354693#M46754</link>
    <description>&lt;P&gt;I tried yesterday by setting updatedDutyCycle to 99 when it was 100, did not work.&lt;/P&gt;&lt;P&gt;Then I just tried to force it to 99 as you asked but the issue's still there.&lt;/P&gt;&lt;P&gt;Could it be a clock issue ?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Edit :&lt;/P&gt;&lt;P&gt;Something strange happens when I set dutycylcle to 99, the time to high is shorter than the time to high when I put 80.&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="SCR03.png" style="width: 400px;"&gt;&lt;img src="https://community.nxp.com/t5/image/serverpage/image-id/158959i7D28CBEAD734A874/image-size/medium?v=v2&amp;amp;px=400" role="button" title="SCR03.png" alt="SCR03.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt; &lt;/P&gt;</description>
    <pubDate>Wed, 13 Oct 2021 07:18:38 GMT</pubDate>
    <dc:creator>francoisB</dc:creator>
    <dc:date>2021-10-13T07:18:38Z</dc:date>
    <item>
      <title>LPC55S06 100Hz PWM with dutycycle change</title>
      <link>https://community.nxp.com/t5/LPC-Microcontrollers/LPC55S06-100Hz-PWM-with-dutycycle-change/m-p/1354092#M46737</link>
      <description>&lt;P&gt;Hello everyone,&lt;/P&gt;&lt;P&gt;Working on an LPC55S06-EVK for future developments on LPC5506, I'm trying to output a 100Hz PWM with dutycycle change (following a gaussian curve). I'm using the example&amp;nbsp; "sctimer_pwm_with_dutycycle_change". It's working with the 24kHz pwm frequency but not with 100Hz (nor 1kHz). It never reaches 100% dutycycle (even if I pass 100 to the variable updatedDutycycle, see image below). As you can see in the video attached to this post, the pwm "jumps back" instead of going to full dutycyle.&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="SCR01.PNG" style="width: 400px;"&gt;&lt;img src="https://community.nxp.com/t5/image/serverpage/image-id/158882i20DAD4259C9E47A8/image-size/medium?v=v2&amp;amp;px=400" role="button" title="SCR01.PNG" alt="SCR01.PNG" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;You can find the code here : &lt;A href="https://pastebin.com/BHBZC0hn" target="_blank" rel="noopener"&gt;https://pastebin.com/BHBZC0hn&lt;/A&gt; .&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks for helping me.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;François&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 12 Oct 2021 09:40:28 GMT</pubDate>
      <guid>https://community.nxp.com/t5/LPC-Microcontrollers/LPC55S06-100Hz-PWM-with-dutycycle-change/m-p/1354092#M46737</guid>
      <dc:creator>francoisB</dc:creator>
      <dc:date>2021-10-12T09:40:28Z</dc:date>
    </item>
    <item>
      <title>Re: LPC55S06 100Hz PWM with dutycycle change</title>
      <link>https://community.nxp.com/t5/LPC-Microcontrollers/LPC55S06-100Hz-PWM-with-dutycycle-change/m-p/1354602#M46750</link>
      <description>&lt;DIV class="de1"&gt;&lt;SPAN class="kw4"&gt;Hi,&lt;/SPAN&gt;&lt;/DIV&gt;
&lt;DIV class="de1"&gt;&amp;nbsp;&lt;/DIV&gt;
&lt;DIV class="de1"&gt;&lt;SPAN class="kw4"&gt;I have checked your code, I think your computation of the ledLogoValue&amp;nbsp; has issue, it is your application code, pls check yourself.&lt;/SPAN&gt;&lt;/DIV&gt;
&lt;DIV class="de1"&gt;&amp;nbsp;&lt;/DIV&gt;
&lt;DIV class="de1"&gt;&lt;SPAN class="kw4"&gt;Pls&amp;nbsp; modify the code like this, then check if the duty cycle can extend to all cycle time.&lt;/SPAN&gt;&lt;/DIV&gt;
&lt;DIV class="de1"&gt;&lt;SPAN class="kw4"&gt;Hope it can help you&lt;/SPAN&gt;&lt;/DIV&gt;
&lt;DIV class="de1"&gt;&lt;SPAN class="kw4"&gt;BR&lt;/SPAN&gt;&lt;/DIV&gt;
&lt;DIV class="de1"&gt;&lt;SPAN class="kw4"&gt;XiangJun Rong&lt;/SPAN&gt;&lt;/DIV&gt;
&lt;DIV class="de1"&gt;&amp;nbsp;&lt;/DIV&gt;
&lt;DIV class="de1"&gt;&lt;SPAN class="kw4"&gt;void&lt;/SPAN&gt; SCTIMER_LED_HANDLER&lt;SPAN class="br0"&gt;(&lt;/SPAN&gt;&lt;SPAN class="br0"&gt;)&lt;/SPAN&gt;&lt;/DIV&gt;
&lt;DIV class="de1"&gt;&lt;SPAN class="br0"&gt;{&lt;/SPAN&gt;&lt;/DIV&gt;
&lt;DIV class="de1"&gt;&amp;nbsp; &amp;nbsp; sctimerIsrFlag &lt;SPAN class="sy0"&gt;=&lt;/SPAN&gt; &lt;SPAN class="kw2"&gt;true&lt;/SPAN&gt;&lt;SPAN class="sy0"&gt;;&lt;/SPAN&gt;&lt;/DIV&gt;
&lt;DIV class="de1"&gt;&amp;nbsp; &amp;nbsp; &lt;SPAN class="kw4"&gt;static&lt;/SPAN&gt; &lt;SPAN class="kw4"&gt;uint8_t&lt;/SPAN&gt; state1 &lt;SPAN class="sy0"&gt;=&lt;/SPAN&gt; &lt;SPAN class="nu0"&gt;0&lt;/SPAN&gt;&lt;SPAN class="sy0"&gt;;&lt;/SPAN&gt;&lt;/DIV&gt;
&lt;DIV class="de1"&gt;&amp;nbsp; &amp;nbsp; &lt;SPAN class="kw4"&gt;static&lt;/SPAN&gt; &lt;SPAN class="kw4"&gt;uint8_t&lt;/SPAN&gt; state2 &lt;SPAN class="sy0"&gt;=&lt;/SPAN&gt; &lt;SPAN class="nu0"&gt;0&lt;/SPAN&gt;&lt;SPAN class="sy0"&gt;;&lt;/SPAN&gt;&lt;/DIV&gt;
&lt;DIV class="de1"&gt;&amp;nbsp; &amp;nbsp; &lt;SPAN class="kw4"&gt;static&lt;/SPAN&gt; &lt;SPAN class="kw4"&gt;uint8_t&lt;/SPAN&gt; state3 &lt;SPAN class="sy0"&gt;=&lt;/SPAN&gt; &lt;SPAN class="nu0"&gt;0&lt;/SPAN&gt;&lt;SPAN class="sy0"&gt;;&lt;/SPAN&gt;&lt;/DIV&gt;
&lt;DIV class="de1"&gt;&lt;SPAN class="sy0"&gt;&amp;nbsp; &amp;nbsp; logo_cycle_time++;&lt;/SPAN&gt;&lt;/DIV&gt;
&lt;DIV class="de1"&gt;&amp;nbsp;&amp;nbsp; if(logo_cycle_time&amp;lt;(sizeof(ledLogoProfilValues)/4))&amp;nbsp; logo_cycle_time=0;&lt;BR /&gt;&lt;BR /&gt;&lt;/DIV&gt;
&lt;DIV class="de1"&gt;&lt;SPAN class="sy0"&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;/DIV&gt;
&lt;DIV class="de1"&gt;&amp;nbsp;&lt;/DIV&gt;
&lt;DIV class="de1"&gt;&amp;nbsp; &amp;nbsp; updatedDutycycle &lt;SPAN class="sy0"&gt;=&lt;/SPAN&gt; &lt;SPAN class="br0"&gt;(&lt;/SPAN&gt;&lt;SPAN class="kw4"&gt;uint8_t&lt;/SPAN&gt;&lt;SPAN class="br0"&gt;)&lt;/SPAN&gt;&lt;SPAN class="br0"&gt;(&lt;/SPAN&gt;ledLogoProfilValues[logo_cycle_time] &lt;SPAN class="sy0"&gt;*&lt;/SPAN&gt; &lt;SPAN class="nu0"&gt;100&lt;/SPAN&gt; &lt;SPAN class="sy0"&gt;/&lt;/SPAN&gt; 3073&lt;SPAN class="sy0"&gt;;&lt;/SPAN&gt;&lt;/DIV&gt;
&lt;DIV class="de1"&gt;&amp;nbsp;&lt;/DIV&gt;
&lt;DIV class="de1"&gt;&amp;nbsp;&lt;/DIV&gt;
&lt;DIV class="de1"&gt;&amp;nbsp; &amp;nbsp; &lt;SPAN class="kw1"&gt;if&lt;/SPAN&gt; &lt;SPAN class="br0"&gt;(&lt;/SPAN&gt;SCTIMER_GetStatusFlags&lt;SPAN class="br0"&gt;(&lt;/SPAN&gt;SCT0&lt;SPAN class="br0"&gt;)&lt;/SPAN&gt; &lt;SPAN class="sy0"&gt;&amp;amp;&lt;/SPAN&gt; &lt;SPAN class="br0"&gt;(&lt;/SPAN&gt;&lt;SPAN class="nu0"&gt;1&lt;/SPAN&gt; &lt;SPAN class="sy0"&gt;&amp;lt;&amp;lt;&lt;/SPAN&gt; eventNumberOutput&lt;SPAN class="br0"&gt;)&lt;/SPAN&gt;&lt;SPAN class="br0"&gt;)&lt;/SPAN&gt;&lt;/DIV&gt;
&lt;DIV class="de1"&gt;&amp;nbsp; &amp;nbsp; &lt;SPAN class="br0"&gt;{&lt;/SPAN&gt;&lt;/DIV&gt;
&lt;DIV class="de1"&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;SPAN class="coMULTI"&gt;/* Clear interrupt flag.*/&lt;/SPAN&gt;&lt;/DIV&gt;
&lt;DIV class="de1"&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; SCTIMER_ClearStatusFlags&lt;SPAN class="br0"&gt;(&lt;/SPAN&gt;SCT0&lt;SPAN class="sy0"&gt;,&lt;/SPAN&gt; &lt;SPAN class="br0"&gt;(&lt;/SPAN&gt;&lt;SPAN class="nu0"&gt;1&lt;/SPAN&gt; &lt;SPAN class="sy0"&gt;&amp;lt;&amp;lt;&lt;/SPAN&gt; eventNumberOutput&lt;SPAN class="br0"&gt;)&lt;/SPAN&gt;&lt;SPAN class="br0"&gt;)&lt;/SPAN&gt;&lt;SPAN class="sy0"&gt;;&lt;/SPAN&gt;&lt;/DIV&gt;
&lt;DIV class="de1"&gt;&amp;nbsp; &amp;nbsp; &lt;SPAN class="br0"&gt;}&lt;/SPAN&gt;&lt;/DIV&gt;
&lt;DIV class="de1"&gt;&lt;SPAN class="br0"&gt;}&lt;/SPAN&gt;&lt;/DIV&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 13 Oct 2021 03:43:42 GMT</pubDate>
      <guid>https://community.nxp.com/t5/LPC-Microcontrollers/LPC55S06-100Hz-PWM-with-dutycycle-change/m-p/1354602#M46750</guid>
      <dc:creator>xiangjun_rong</dc:creator>
      <dc:date>2021-10-13T03:43:42Z</dc:date>
    </item>
    <item>
      <title>Re: LPC55S06 100Hz PWM with dutycycle change</title>
      <link>https://community.nxp.com/t5/LPC-Microcontrollers/LPC55S06-100Hz-PWM-with-dutycycle-change/m-p/1354682#M46752</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;My application code is not the issue because when I try this code :&lt;/P&gt;&lt;P&gt;void SCTIMER_LED_HANDLER()&lt;BR /&gt;{&lt;BR /&gt;sctimerIsrFlag = true;&lt;/P&gt;&lt;P&gt;updatedDutycycle = 100;&lt;/P&gt;&lt;P&gt;if (SCTIMER_GetStatusFlags(SCT0) &amp;amp; (1 &amp;lt;&amp;lt; eventNumberOutput))&lt;BR /&gt;{&lt;BR /&gt;/* Clear interrupt flag.*/&lt;BR /&gt;SCTIMER_ClearStatusFlags(SCT0, (1 &amp;lt;&amp;lt; eventNumberOutput));&lt;BR /&gt;}&lt;BR /&gt;}&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;So the dutycycle is set to 100 (thus 100%), the issue is still there (as shown in the screenshot below).&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="SCR01.PNG" style="width: 400px;"&gt;&lt;img src="https://community.nxp.com/t5/image/serverpage/image-id/158955i1DED393615C771B2/image-size/medium?v=v2&amp;amp;px=400" role="button" title="SCR01.PNG" alt="SCR01.PNG" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks for your reply.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;François&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt; &lt;/P&gt;</description>
      <pubDate>Wed, 13 Oct 2021 06:44:34 GMT</pubDate>
      <guid>https://community.nxp.com/t5/LPC-Microcontrollers/LPC55S06-100Hz-PWM-with-dutycycle-change/m-p/1354682#M46752</guid>
      <dc:creator>francoisB</dc:creator>
      <dc:date>2021-10-13T06:44:34Z</dc:date>
    </item>
    <item>
      <title>Re: LPC55S06 100Hz PWM with dutycycle change</title>
      <link>https://community.nxp.com/t5/LPC-Microcontrollers/LPC55S06-100Hz-PWM-with-dutycycle-change/m-p/1354690#M46753</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;
&lt;P&gt;The range of the updatedDutycycle is from 1 to 99, do you have issue if you set the variable in the range?&lt;/P&gt;
&lt;P&gt;BR&lt;/P&gt;
&lt;P&gt;XiangJun Rong&lt;/P&gt;</description>
      <pubDate>Wed, 13 Oct 2021 06:54:19 GMT</pubDate>
      <guid>https://community.nxp.com/t5/LPC-Microcontrollers/LPC55S06-100Hz-PWM-with-dutycycle-change/m-p/1354690#M46753</guid>
      <dc:creator>xiangjun_rong</dc:creator>
      <dc:date>2021-10-13T06:54:19Z</dc:date>
    </item>
    <item>
      <title>Re: LPC55S06 100Hz PWM with dutycycle change</title>
      <link>https://community.nxp.com/t5/LPC-Microcontrollers/LPC55S06-100Hz-PWM-with-dutycycle-change/m-p/1354693#M46754</link>
      <description>&lt;P&gt;I tried yesterday by setting updatedDutyCycle to 99 when it was 100, did not work.&lt;/P&gt;&lt;P&gt;Then I just tried to force it to 99 as you asked but the issue's still there.&lt;/P&gt;&lt;P&gt;Could it be a clock issue ?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Edit :&lt;/P&gt;&lt;P&gt;Something strange happens when I set dutycylcle to 99, the time to high is shorter than the time to high when I put 80.&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="SCR03.png" style="width: 400px;"&gt;&lt;img src="https://community.nxp.com/t5/image/serverpage/image-id/158959i7D28CBEAD734A874/image-size/medium?v=v2&amp;amp;px=400" role="button" title="SCR03.png" alt="SCR03.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt; &lt;/P&gt;</description>
      <pubDate>Wed, 13 Oct 2021 07:18:38 GMT</pubDate>
      <guid>https://community.nxp.com/t5/LPC-Microcontrollers/LPC55S06-100Hz-PWM-with-dutycycle-change/m-p/1354693#M46754</guid>
      <dc:creator>francoisB</dc:creator>
      <dc:date>2021-10-13T07:18:38Z</dc:date>
    </item>
    <item>
      <title>Re: LPC55S06 100Hz PWM with dutycycle change</title>
      <link>https://community.nxp.com/t5/LPC-Microcontrollers/LPC55S06-100Hz-PWM-with-dutycycle-change/m-p/1354737#M46755</link>
      <description>&lt;P&gt;I did some measurements with my oscilloscope. You can see in the table below the time to high for different dutycycles :&lt;/P&gt;&lt;TABLE border="0" width="166" cellspacing="0" cellpadding="0"&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TD width="83" height="19" class="xl65"&gt;dutycycle&lt;/TD&gt;&lt;TD width="83" class="xl65"&gt;time to HIGH (µs)&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD height="19" class="xl65"&gt;1&lt;/TD&gt;&lt;TD class="xl65"&gt;101&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD height="19" class="xl65"&gt;5&lt;/TD&gt;&lt;TD class="xl65"&gt;501&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD height="19" class="xl65"&gt;10&lt;/TD&gt;&lt;TD class="xl65"&gt;318&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD height="19" class="xl65"&gt;20&lt;/TD&gt;&lt;TD class="xl65"&gt;635&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD height="19" class="xl65"&gt;30&lt;/TD&gt;&lt;TD class="xl65"&gt;271&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD height="19" class="xl65"&gt;40&lt;/TD&gt;&lt;TD class="xl65"&gt;587&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD height="19" class="xl65"&gt;50&lt;/TD&gt;&lt;TD class="xl65"&gt;222&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD height="19" class="xl65"&gt;60&lt;/TD&gt;&lt;TD class="xl65"&gt;539&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD height="19" class="xl65"&gt;70&lt;/TD&gt;&lt;TD class="xl65"&gt;174&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD height="19" class="xl65"&gt;80&lt;/TD&gt;&lt;TD class="xl65"&gt;491&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD height="19" class="xl65"&gt;90&lt;/TD&gt;&lt;TD class="xl65"&gt;127&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD height="19" class="xl65"&gt;99&lt;/TD&gt;&lt;TD class="xl65"&gt;343&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD height="19" class="xl65"&gt;100&lt;/TD&gt;&lt;TD class="xl65"&gt;443&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 13 Oct 2021 07:43:27 GMT</pubDate>
      <guid>https://community.nxp.com/t5/LPC-Microcontrollers/LPC55S06-100Hz-PWM-with-dutycycle-change/m-p/1354737#M46755</guid>
      <dc:creator>francoisB</dc:creator>
      <dc:date>2021-10-13T07:43:27Z</dc:date>
    </item>
    <item>
      <title>Re: LPC55S06 100Hz PWM with dutycycle change</title>
      <link>https://community.nxp.com/t5/LPC-Microcontrollers/LPC55S06-100Hz-PWM-with-dutycycle-change/m-p/1354744#M46756</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;
&lt;P&gt;when the updatedDutycycle1 is set up as 99, the screenshot is like the following Fig, obviously, it is correct.&lt;/P&gt;
&lt;P&gt;BR&lt;/P&gt;
&lt;P&gt;XiangJun Rong&lt;/P&gt;
&lt;P&gt;volatile uint8_t updatedDutycycle = 10U;&lt;BR /&gt;volatile uint8_t updatedDutycycle1;&lt;/P&gt;
&lt;P&gt;updatedDutycycle1=99;&lt;BR /&gt;/* Update PWM duty cycle */&lt;BR /&gt;SCTIMER_UpdatePwmDutycycle(SCT0, DEMO_SCTIMER_OUT, updatedDutycycle1, eventNumberOutput);&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="xiangjun_rong_0-1634110720612.png" style="width: 400px;"&gt;&lt;img src="https://community.nxp.com/t5/image/serverpage/image-id/158963i2A7BFB0BBAF652E5/image-size/medium?v=v2&amp;amp;px=400" role="button" title="xiangjun_rong_0-1634110720612.png" alt="xiangjun_rong_0-1634110720612.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 13 Oct 2021 07:43:16 GMT</pubDate>
      <guid>https://community.nxp.com/t5/LPC-Microcontrollers/LPC55S06-100Hz-PWM-with-dutycycle-change/m-p/1354744#M46756</guid>
      <dc:creator>xiangjun_rong</dc:creator>
      <dc:date>2021-10-13T07:43:16Z</dc:date>
    </item>
    <item>
      <title>Re: LPC55S06 100Hz PWM with dutycycle change</title>
      <link>https://community.nxp.com/t5/LPC-Microcontrollers/LPC55S06-100Hz-PWM-with-dutycycle-change/m-p/1354750#M46758</link>
      <description>&lt;P&gt;It's working because you set the pwm frequency to 24kHz. Could you try with 100Hz to see if it still works please ?&lt;/P&gt;</description>
      <pubDate>Wed, 13 Oct 2021 07:47:35 GMT</pubDate>
      <guid>https://community.nxp.com/t5/LPC-Microcontrollers/LPC55S06-100Hz-PWM-with-dutycycle-change/m-p/1354750#M46758</guid>
      <dc:creator>francoisB</dc:creator>
      <dc:date>2021-10-13T07:47:35Z</dc:date>
    </item>
    <item>
      <title>Re: LPC55S06 100Hz PWM with dutycycle change</title>
      <link>https://community.nxp.com/t5/LPC-Microcontrollers/LPC55S06-100Hz-PWM-with-dutycycle-change/m-p/1354783#M46760</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;
&lt;P&gt;I can duplicate your issue, when the PWM frequency is 100Hz, the duty cycle is abnormal.&lt;/P&gt;
&lt;P&gt;I will check the code later.&lt;/P&gt;
&lt;P&gt;BR&lt;/P&gt;
&lt;P&gt;Xiangjun Rong&lt;/P&gt;</description>
      <pubDate>Wed, 13 Oct 2021 08:22:37 GMT</pubDate>
      <guid>https://community.nxp.com/t5/LPC-Microcontrollers/LPC55S06-100Hz-PWM-with-dutycycle-change/m-p/1354783#M46760</guid>
      <dc:creator>xiangjun_rong</dc:creator>
      <dc:date>2021-10-13T08:22:37Z</dc:date>
    </item>
    <item>
      <title>Re: LPC55S06 100Hz PWM with dutycycle change</title>
      <link>https://community.nxp.com/t5/LPC-Microcontrollers/LPC55S06-100Hz-PWM-with-dutycycle-change/m-p/1354848#M46766</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;
&lt;P&gt;Finally, I get the root cause of the issue, the sctimer driver has problem.&lt;/P&gt;
&lt;P&gt;Pls use the following code I modified, I have tested, it works well.&lt;/P&gt;
&lt;P&gt;the cause of the issue is that the pulsePeriod variable is 0x75300 at most in 100Hz PWM signal, when it use the macro SCT_MATCHREL_RELOADn_L(pulsePeriod); high half word 0x7 will be removed, it results problem obviously. But when the pulsePeriod is less than 0xFFFF, no problem.&lt;/P&gt;
&lt;P&gt;#if 0&lt;BR /&gt;base-&amp;gt;MATCH[pulseMatchReg] = SCT_MATCH_MATCHn_L(pulsePeriod);&lt;BR /&gt;base-&amp;gt;MATCHREL[pulseMatchReg] = SCT_MATCHREL_RELOADn_L(pulsePeriod);&lt;BR /&gt;#else&lt;BR /&gt;base-&amp;gt;MATCH[pulseMatchReg] = pulsePeriod;&lt;BR /&gt;base-&amp;gt;MATCHREL[pulseMatchReg] = pulsePeriod;&lt;BR /&gt;#endif&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Pls modify the function in fsl_sctimer.c&lt;/P&gt;
&lt;P&gt;BR&lt;/P&gt;
&lt;P&gt;XiangJun Rong&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;/*!&lt;BR /&gt;* brief Updates the duty cycle of an active PWM signal.&lt;BR /&gt;*&lt;BR /&gt;* Before calling this function, the counter is set to operate as one 32-bit counter (unify bit is set to 1).&lt;BR /&gt;*&lt;BR /&gt;* param base SCTimer peripheral base address&lt;BR /&gt;* param output The output to configure&lt;BR /&gt;* param dutyCyclePercent New PWM pulse width; the value should be between 0 to 100&lt;BR /&gt;* param event Event number associated with this PWM signal. This was returned to the user by the&lt;BR /&gt;* function SCTIMER_SetupPwm().&lt;BR /&gt;*/&lt;BR /&gt;void SCTIMER_UpdatePwmDutycycle(SCT_Type *base, sctimer_out_t output, uint8_t dutyCyclePercent, uint32_t event)&lt;/P&gt;
&lt;P&gt;{&lt;BR /&gt;assert(dutyCyclePercent &amp;lt;= 100U);&lt;BR /&gt;assert((uint32_t)output &amp;lt; (uint32_t)FSL_FEATURE_SCT_NUMBER_OF_OUTPUTS);&lt;BR /&gt;assert(1U == (base-&amp;gt;CONFIG &amp;amp; SCT_CONFIG_UNIFY_MASK));&lt;/P&gt;
&lt;P&gt;uint32_t periodMatchReg, pulseMatchReg;&lt;BR /&gt;uint32_t pulsePeriod = 0, period;&lt;/P&gt;
&lt;P&gt;/* Retrieve the match register number for the PWM period */&lt;BR /&gt;periodMatchReg = base-&amp;gt;EV[event].CTRL &amp;amp; SCT_EV_CTRL_MATCHSEL_MASK;&lt;/P&gt;
&lt;P&gt;/* Retrieve the match register number for the PWM pulse period */&lt;BR /&gt;pulseMatchReg = base-&amp;gt;EV[event + 1U].CTRL &amp;amp; SCT_EV_CTRL_MATCHSEL_MASK;&lt;/P&gt;
&lt;P&gt;period = base-&amp;gt;MATCH[periodMatchReg];&lt;/P&gt;
&lt;P&gt;/* Calculate pulse width and period match value:&lt;BR /&gt;* For EdgeAlignedPwm, "pulsePeriod = 0" results in 0% dutycyle, "pulsePeriod = period - 1U" results in 100%&lt;BR /&gt;* dutycyle. For CenterAlignedPwm, , "pulsePeriod = 0" results in 0% dutycyle, "pulsePeriod = period + 2U"&lt;BR /&gt;* results in 100% dutycyle.&lt;BR /&gt;*/&lt;BR /&gt;pulsePeriod = (uint32_t)(((uint64_t)period * dutyCyclePercent) / 100U);&lt;/P&gt;
&lt;P&gt;if (dutyCyclePercent == 100U)&lt;BR /&gt;{&lt;BR /&gt;if (0U == (base-&amp;gt;CTRL &amp;amp; SCT_CTRL_BIDIR_L_MASK))&lt;BR /&gt;{&lt;BR /&gt;pulsePeriod = period + 2U;&lt;BR /&gt;}&lt;BR /&gt;else&lt;BR /&gt;{&lt;BR /&gt;pulsePeriod = period - 1U;&lt;BR /&gt;}&lt;BR /&gt;}&lt;/P&gt;
&lt;P&gt;/* Stop the counter before updating match register */&lt;BR /&gt;SCTIMER_StopTimer(base, (uint32_t)kSCTIMER_Counter_U);&lt;/P&gt;
&lt;P&gt;/* Update dutycycle */&lt;/P&gt;
&lt;P&gt;&lt;FONT color="#FF0000"&gt;//////////Rong wrote, pls modify&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT color="#FF0000"&gt;#if 0&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT color="#FF0000"&gt;base-&amp;gt;MATCH[pulseMatchReg] = SCT_MATCH_MATCHn_L(pulsePeriod);&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT color="#FF0000"&gt;base-&amp;gt;MATCHREL[pulseMatchReg] = SCT_MATCHREL_RELOADn_L(pulsePeriod);&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT color="#FF0000"&gt;#else&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT color="#FF0000"&gt;base-&amp;gt;MATCH[pulseMatchReg] = pulsePeriod;&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT color="#FF0000"&gt;base-&amp;gt;MATCHREL[pulseMatchReg] = pulsePeriod;&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT color="#FF0000"&gt;#endif&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT color="#FF0000"&gt;/* Restart the counter */&lt;/FONT&gt;&lt;BR /&gt;SCTIMER_StartTimer(base, (uint32_t)kSCTIMER_Counter_U);&lt;BR /&gt;}&lt;/P&gt;</description>
      <pubDate>Wed, 13 Oct 2021 09:27:35 GMT</pubDate>
      <guid>https://community.nxp.com/t5/LPC-Microcontrollers/LPC55S06-100Hz-PWM-with-dutycycle-change/m-p/1354848#M46766</guid>
      <dc:creator>xiangjun_rong</dc:creator>
      <dc:date>2021-10-13T09:27:35Z</dc:date>
    </item>
    <item>
      <title>Re: LPC55S06 100Hz PWM with dutycycle change</title>
      <link>https://community.nxp.com/t5/LPC-Microcontrollers/LPC55S06-100Hz-PWM-with-dutycycle-change/m-p/1354863#M46769</link>
      <description>&lt;P&gt;Thank you very much, it works !&lt;/P&gt;</description>
      <pubDate>Wed, 13 Oct 2021 09:43:39 GMT</pubDate>
      <guid>https://community.nxp.com/t5/LPC-Microcontrollers/LPC55S06-100Hz-PWM-with-dutycycle-change/m-p/1354863#M46769</guid>
      <dc:creator>francoisB</dc:creator>
      <dc:date>2021-10-13T09:43:39Z</dc:date>
    </item>
  </channel>
</rss>

