<?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 Phase-shift PWM in MC56F82748 in Digital Signal Controllers</title>
    <link>https://community.nxp.com/t5/Digital-Signal-Controllers/Phase-shift-PWM-in-MC56F82748/m-p/762569#M1228</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello community,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I recently started a project for a control system design of a Phase-shift full bridge&amp;nbsp;DC-DC converter. I found an example code of the phase-shift PWM, but I do not understand how the phase shift operates in the code and how you can control it.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Could you please give me a hint how&amp;nbsp;to control the phase-shift?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thank you in advance.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;P.S. I am a newbie to that stuff, please don't be harsh to me&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Tue, 24 Apr 2018 08:14:52 GMT</pubDate>
    <dc:creator>engineer12</dc:creator>
    <dc:date>2018-04-24T08:14:52Z</dc:date>
    <item>
      <title>Phase-shift PWM in MC56F82748</title>
      <link>https://community.nxp.com/t5/Digital-Signal-Controllers/Phase-shift-PWM-in-MC56F82748/m-p/762569#M1228</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello community,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I recently started a project for a control system design of a Phase-shift full bridge&amp;nbsp;DC-DC converter. I found an example code of the phase-shift PWM, but I do not understand how the phase shift operates in the code and how you can control it.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Could you please give me a hint how&amp;nbsp;to control the phase-shift?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thank you in advance.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;P.S. I am a newbie to that stuff, please don't be harsh to me&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 24 Apr 2018 08:14:52 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Digital-Signal-Controllers/Phase-shift-PWM-in-MC56F82748/m-p/762569#M1228</guid>
      <dc:creator>engineer12</dc:creator>
      <dc:date>2018-04-24T08:14:52Z</dc:date>
    </item>
    <item>
      <title>Re: Phase-shift PWM in MC56F82748</title>
      <link>https://community.nxp.com/t5/Digital-Signal-Controllers/Phase-shift-PWM-in-MC56F82748/m-p/762570#M1229</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello Ivan,&lt;/P&gt;&lt;P&gt;No problem, this code example has been created by my team. We will explain you in details.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;With Regards&lt;/P&gt;&lt;P&gt;Kamil&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 24 Apr 2018 15:47:58 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Digital-Signal-Controllers/Phase-shift-PWM-in-MC56F82748/m-p/762570#M1229</guid>
      <dc:creator>mohammad_kamil</dc:creator>
      <dc:date>2018-04-24T15:47:58Z</dc:date>
    </item>
    <item>
      <title>Re: Phase-shift PWM in MC56F82748</title>
      <link>https://community.nxp.com/t5/Digital-Signal-Controllers/Phase-shift-PWM-in-MC56F82748/m-p/762571#M1230</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi, Ivan,&lt;/P&gt;&lt;P&gt;Regarding your question how the phase-shift funmction of PWM is implemented, this is the basic theory.&lt;/P&gt;&lt;P&gt;As you know that the eFlexPWM module has 4 sub-module: SM0, SM1, SM2 and SM3, each sub-module SMn can generates two PWM signal:PWM_SMnA and PWM_SMnB, the two signals PWM_SMnA and PWM_SMnB can be independent or complementary with deadtime insertion.&lt;/P&gt;&lt;P&gt;The PWM sub-module works independently, from theory, each PWM sub-module is a counter, it can count tick from PWMA_SMnINIT to PWMA_SMnVAL1, then&amp;nbsp; from PWMA_SMnINIT to PWMA_SMnVAL1 repeatedly. When the counter reach up to PWMA_SMnVAL3, PWM_SMnA signal becomes High logic, when the counter reach up to PWMA_SMnVAL4, PWM_SMnA signal becomes Low logic, so that the PWM cycle time is PWMA_SMnVAL1-PWMA_SMnINIT. The PWM duty cycle time is PWMA_SMnVAL4-PWMA_SMnVAL3.&lt;/P&gt;&lt;P&gt;If you want to implement phase-shift feature while the SMn works in complementary mode, as the example, you can use SM0 and SM1, of course, the SM0 and SM1 module must be synchronized by setting the PWMA_SM0CTRL2[INIT_SEL]=00,PWMA_SM1CTRL2[INIT_SEL]=10.&lt;/P&gt;&lt;P&gt;This is the register setting for the the SM0 and SM1:&lt;/P&gt;&lt;P&gt;PWMA_SM0INIT=PWMA_SM1INIT=-2000;&lt;/P&gt;&lt;P&gt;PWMA_SM0VAL1=PWMA_SM1VAL1=2000; //the duty cycle=4000 tick &lt;/P&gt;&lt;P&gt;SM0:&lt;/P&gt;&lt;P&gt;PWMA_SM0VAL3=-2000;&lt;/P&gt;&lt;P&gt;PWMA_SM0VAL4=0; //the PWMA_SM0A duty cycle is 2000/4000=50%&lt;/P&gt;&lt;P&gt;The SM0 register setting is fixed.&lt;/P&gt;&lt;P&gt;SM1:&lt;/P&gt;&lt;P&gt;PWMA_SM1VAL3=-2000;&lt;/P&gt;&lt;P&gt;PWMA_SM1VAL4=0; //the PWMA_SM0A duty cycle is 2000/4000=50%&lt;/P&gt;&lt;P&gt;Result: the PWMA_SM1A and PWMA_SM0A signal are the same&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;PWMA_SM1VAL3=-1000;&lt;/P&gt;&lt;P&gt;PWMA_SM1VAL4=-1000+2000=1000; //the PWMA_SM0A duty cycle is 2000/4000=50%&lt;/P&gt;&lt;P&gt;Result: the PWMA_SM1A lag behind PWMA_SM0A signal 90 degree&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;PWMA_SM1VAL3=0;&lt;/P&gt;&lt;P&gt;PWMA_SM1VAL4=0+2000=2000; //the PWMA_SM0A duty cycle is 2000/4000=50%&lt;/P&gt;&lt;P&gt;Result: the PWMA_SM1A lag behind PWMA_SM0A signal 180 degree, in other words, they are inverter.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;This is the code to update the phase shift in reload ISR.&lt;/P&gt;&lt;P&gt;Hope it can help you&lt;/P&gt;&lt;P&gt;BR&lt;/P&gt;&lt;P&gt;Xiangjun rong&lt;/P&gt;&lt;P&gt;void PWMA_0_Reload_ISR(void)&lt;BR /&gt;{&lt;BR /&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;PWMA_REGS_ALL *ptr = &amp;amp;udtPWMAreg;&lt;BR /&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;//GPIOE_DR &amp;amp;= ~GPIOE_DR_D_3; &lt;BR /&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;setReg16Bits(PWMA_SM0STS,0x1000);&amp;nbsp;&amp;nbsp; &amp;nbsp;/* Clear interrupt request flag */&lt;BR /&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;invertReg16Bits(GPIOF_DR,0x040);&amp;nbsp;&amp;nbsp; &amp;nbsp;/* Toggle GPIOF6 output LED8 */&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;ptr-&amp;gt;SM1.pwmsmval2 = (Word16)ptr-&amp;gt;SM1.pwmsmval2 + 2;&lt;BR /&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;if((Word16)ptr-&amp;gt;SM1.pwmsmval2&amp;gt;=0) //ptr-&amp;gt;SM1.pwmsmval1)&lt;BR /&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;{&lt;BR /&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;ptr-&amp;gt;SM1.pwmsmval2 = -2000; //ptr-&amp;gt;SM1.pwmsminit;&lt;BR /&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;}&lt;BR /&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;ptr-&amp;gt;SM1.pwmsmval3 = (Word16)ptr-&amp;gt;SM1.pwmsmval2 + 2000;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;phase = (ptr-&amp;gt;SM1.pwmsmval2&amp;nbsp; - ptr-&amp;gt;SM0.pwmsmval2);&lt;BR /&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;FMSTR_Recorder();&lt;BR /&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;PWM_A_Update(&amp;amp;udtPWMAreg);&lt;BR /&gt;}&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 25 Apr 2018 07:12:56 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Digital-Signal-Controllers/Phase-shift-PWM-in-MC56F82748/m-p/762571#M1230</guid>
      <dc:creator>xiangjun_rong</dc:creator>
      <dc:date>2018-04-25T07:12:56Z</dc:date>
    </item>
    <item>
      <title>Re: Phase-shift PWM in MC56F82748</title>
      <link>https://community.nxp.com/t5/Digital-Signal-Controllers/Phase-shift-PWM-in-MC56F82748/m-p/762572#M1231</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello&amp;nbsp;&lt;A class="jx-jive-macro-user" href="https://community.nxp.com/people/engineer12"&gt;engineer12&lt;/A&gt;, Xiangjun as already explained about the code how it is been implemented. I will just give you the background of Phase shift full bridge converter.&lt;/P&gt;&lt;P&gt;Phase shift Full bridge converter is generally used for high power high voltage application to reduce the switching losses by achieving zero voltage switching of its MOSFET. zero voltage switching is achieve by using parasitic inductance transformer and parasitic capacitance of MOSFETs.&amp;nbsp;&lt;/P&gt;&lt;P&gt;To implement these, we need to two pair of PWM operated in fix 50% duty cycle in complementary mode. and phase difference between these two pair defined the duty cycle of converter.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Feel free to contact should you need more insight of phase shift full bridge converter and its implementation.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;With Regards&lt;/P&gt;&lt;P&gt;Kamil&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 25 Apr 2018 09:55:29 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Digital-Signal-Controllers/Phase-shift-PWM-in-MC56F82748/m-p/762572#M1231</guid>
      <dc:creator>mohammad_kamil</dc:creator>
      <dc:date>2018-04-25T09:55:29Z</dc:date>
    </item>
    <item>
      <title>Re: Phase-shift PWM in MC56F82748</title>
      <link>https://community.nxp.com/t5/Digital-Signal-Controllers/Phase-shift-PWM-in-MC56F82748/m-p/762573#M1232</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;here is the attachment&amp;nbsp;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 25 Apr 2018 09:57:26 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Digital-Signal-Controllers/Phase-shift-PWM-in-MC56F82748/m-p/762573#M1232</guid>
      <dc:creator>mohammad_kamil</dc:creator>
      <dc:date>2018-04-25T09:57:26Z</dc:date>
    </item>
    <item>
      <title>Re: Phase-shift PWM in MC56F82748</title>
      <link>https://community.nxp.com/t5/Digital-Signal-Controllers/Phase-shift-PWM-in-MC56F82748/m-p/762574#M1233</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello Xiangjun,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thank you for replying to my question.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Unfortunately, the suggested changes didn't work for me, probably because I was not able to change the PWMA_SM0CTRL2[INIT_SEL]=00,PWMA_SM1CTRL2[INIT_SEL]=10 , as they are 0xE602 and 0xE632 accordingly. In addition when I did the changes you mentioned, I lost the SM1 PWM responses as well as the SM0 response was not as sharp as in the example code.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Could you please give me a hint how to change the SMnCTRL2 values? Also, do you mean by changing the values of VAL3&amp;amp;4 of SM1 we control the phase shift?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thank you in advance.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Kind regards,&lt;/P&gt;&lt;P&gt;Ivan&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 26 Apr 2018 13:00:05 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Digital-Signal-Controllers/Phase-shift-PWM-in-MC56F82748/m-p/762574#M1233</guid>
      <dc:creator>engineer12</dc:creator>
      <dc:date>2018-04-26T13:00:05Z</dc:date>
    </item>
    <item>
      <title>Re: Phase-shift PWM in MC56F82748</title>
      <link>https://community.nxp.com/t5/Digital-Signal-Controllers/Phase-shift-PWM-in-MC56F82748/m-p/762575#M1234</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello Kamil,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thank you for explaining the operation of the phase shift full bridge converter.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Looking at the Xiangjun code it seems that the phase shift is achieved by varying the frequency of the SM1. As far as I understand, the frequency and the duty cycle should be fixed. How can I control the phase shift between SM0 and SM1?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thank you in advance.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Kind regards,&lt;/P&gt;&lt;P&gt;Ivan&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 26 Apr 2018 14:53:35 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Digital-Signal-Controllers/Phase-shift-PWM-in-MC56F82748/m-p/762575#M1234</guid>
      <dc:creator>engineer12</dc:creator>
      <dc:date>2018-04-26T14:53:35Z</dc:date>
    </item>
    <item>
      <title>Re: Phase-shift PWM in MC56F82748</title>
      <link>https://community.nxp.com/t5/Digital-Signal-Controllers/Phase-shift-PWM-in-MC56F82748/m-p/762576#M1235</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello Ivan,&lt;/P&gt;&lt;P&gt;Phase shift can be implemented in various way, as we dont have hardware implementation and it has to be software. One of the simplest way could be you fix both SM0 and SM1 PWMs as fix frequency and fix 50% duty with complementary mode.&amp;nbsp;&lt;/P&gt;&lt;P&gt;E.g Period value = 1000&lt;/P&gt;&lt;P&gt;Period/2 = 500 (50% duty cycle)&lt;/P&gt;&lt;P&gt;SM0_VALinit = 0&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;SM0_VAL1&amp;nbsp;= Period value&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;SM0_VAL2 = 0&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;SM0_VAL3&lt;SPAN&gt;&amp;nbsp;= Period value/2 (500) , 50% duty cycle&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;SM1_VALinit = 0&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;SM1_VAL1&amp;nbsp;= Period value&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;SM1_VAL2 = 0&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;SM1_VAL3&lt;SPAN&gt;&amp;nbsp;= Period value/2&amp;nbsp;(500) &amp;nbsp;, 50% duty cycle&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;&lt;SPAN&gt;This will produce 0% duty cycle&amp;nbsp;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;&lt;SPAN&gt;let say if you want to have effective duty of 50% duty cycle with means phase difference between SM0 and SM1 should be 1000/4 = 250 (phase)&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;&lt;SPAN&gt;then you need just change value of SM1_VAL2 and SM1_VAL3&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;SM1_VAL2 = 250&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;SM1_VAL3&lt;SPAN&gt;&amp;nbsp;= 250 (phase)&amp;nbsp; + Period value/2 (500) = 750&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;&lt;SPAN&gt;With Regards&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;&lt;SPAN&gt;Kamil&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 27 Apr 2018 10:37:55 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Digital-Signal-Controllers/Phase-shift-PWM-in-MC56F82748/m-p/762576#M1235</guid>
      <dc:creator>mohammad_kamil</dc:creator>
      <dc:date>2018-04-27T10:37:55Z</dc:date>
    </item>
  </channel>
</rss>

