<?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 PMF problem on power-on in S12 / MagniV Microcontrollers</title>
    <link>https://community.nxp.com/t5/S12-MagniV-Microcontrollers/PMF-problem-on-power-on/m-p/510309#M12441</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello community,&lt;/P&gt;&lt;P style="min-height: 8pt; padding: 0px;"&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I'm working on a project using a s12zvm for a pmsm motor controller. It is based on the PMSM app note for this device.&lt;/P&gt;&lt;P style="min-height: 8pt; padding: 0px;"&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I have something that works very well but not always.&lt;/P&gt;&lt;P style="min-height: 8pt; padding: 0px;"&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;The goal now is to disconnect the computer (debugger (p&amp;amp;e multilink universal) and the rs-232 for freemaster) to have something that can work by itself. &lt;/P&gt;&lt;P style="min-height: 8pt; padding: 0px;"&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;My software does everything correctly when I just flashed the code (ctrl-f11 in CW) but if the system power is cycled it doesn't work so well. The main problem is the PMF signal not getting out. I have pwm only on "C" outputs, but nothing on A and B. It is the same code that worked well when just flashed and runned from CW. I did not see other things failing in the code, I still have access to it with freemaster.&lt;/P&gt;&lt;P style="min-height: 8pt; padding: 0px;"&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Any suggestions ?&lt;/P&gt;&lt;P style="min-height: 8pt; padding: 0px;"&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Jasmin&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Fri, 22 Jan 2016 07:57:24 GMT</pubDate>
    <dc:creator>jasminrouleau</dc:creator>
    <dc:date>2016-01-22T07:57:24Z</dc:date>
    <item>
      <title>PMF problem on power-on</title>
      <link>https://community.nxp.com/t5/S12-MagniV-Microcontrollers/PMF-problem-on-power-on/m-p/510309#M12441</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello community,&lt;/P&gt;&lt;P style="min-height: 8pt; padding: 0px;"&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I'm working on a project using a s12zvm for a pmsm motor controller. It is based on the PMSM app note for this device.&lt;/P&gt;&lt;P style="min-height: 8pt; padding: 0px;"&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I have something that works very well but not always.&lt;/P&gt;&lt;P style="min-height: 8pt; padding: 0px;"&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;The goal now is to disconnect the computer (debugger (p&amp;amp;e multilink universal) and the rs-232 for freemaster) to have something that can work by itself. &lt;/P&gt;&lt;P style="min-height: 8pt; padding: 0px;"&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;My software does everything correctly when I just flashed the code (ctrl-f11 in CW) but if the system power is cycled it doesn't work so well. The main problem is the PMF signal not getting out. I have pwm only on "C" outputs, but nothing on A and B. It is the same code that worked well when just flashed and runned from CW. I did not see other things failing in the code, I still have access to it with freemaster.&lt;/P&gt;&lt;P style="min-height: 8pt; padding: 0px;"&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Any suggestions ?&lt;/P&gt;&lt;P style="min-height: 8pt; padding: 0px;"&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Jasmin&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 22 Jan 2016 07:57:24 GMT</pubDate>
      <guid>https://community.nxp.com/t5/S12-MagniV-Microcontrollers/PMF-problem-on-power-on/m-p/510309#M12441</guid>
      <dc:creator>jasminrouleau</dc:creator>
      <dc:date>2016-01-22T07:57:24Z</dc:date>
    </item>
    <item>
      <title>Re: PMF problem on power-on</title>
      <link>https://community.nxp.com/t5/S12-MagniV-Microcontrollers/PMF-problem-on-power-on/m-p/510310#M12442</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I got it... &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I'm not using the GDU to drive the FETs but an external gate driver (system voltage is to high for GDU) so I must change the MODRR1 register to route pwm on i/o instead of GDU. MODRR register are write-once in normal mode (anytime in SSC) . I was doing:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;MODRR1_PWM54RR=1; //PWM to I/O instead of GDU&lt;/P&gt;&lt;P&gt;MODRR1_PWM32RR=1;&lt;/P&gt;&lt;P&gt;MODRR1_PWM10RR=1;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;instead of :&lt;/P&gt;&lt;P&gt;MODRR1|=0x07;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;This is why only one phase was activated in Normal mode ...&amp;nbsp; &lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 22 Jan 2016 16:09:31 GMT</pubDate>
      <guid>https://community.nxp.com/t5/S12-MagniV-Microcontrollers/PMF-problem-on-power-on/m-p/510310#M12442</guid>
      <dc:creator>jasminrouleau</dc:creator>
      <dc:date>2016-01-22T16:09:31Z</dc:date>
    </item>
    <item>
      <title>Re: PMF problem on power-on</title>
      <link>https://community.nxp.com/t5/S12-MagniV-Microcontrollers/PMF-problem-on-power-on/m-p/510311#M12443</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi, I face the same problem like you,there have no pwm in i/o port.And my code as follow: &amp;nbsp; &amp;nbsp;Can you give me same advice?&lt;/P&gt;&lt;P&gt;void initPMF(void){&lt;/P&gt;&lt;P&gt;PMFCFG0_EDGEA = 1;&lt;BR /&gt; PMFCFG0_EDGEB = 1;&lt;BR /&gt; PMFCFG0_EDGEC = 1; //01 23 45 complementary pwm pair and edge-aligned pwm&lt;BR /&gt; &lt;BR /&gt; PMFCFG0_INDEPA = 1; //independent mode&lt;BR /&gt; PMFCFG0_INDEPB = 1;&lt;BR /&gt; PMFCFG0_INDEPC = 1;&lt;/P&gt;&lt;P&gt;PMFCFG2_REV0 = 1; // 01 PWM generator A generates reload event.&lt;BR /&gt; PMFCFG2_REV1 = 0;&lt;/P&gt;&lt;P&gt;PMFOUTB = 0x2A; // Low MOSFETs ON while SW control (Unipolar PWM) 01 23 45 complementary pwm pair&lt;/P&gt;&lt;P&gt;PMFCFG3_VLMODE = 0x01; // Writing to value register zero also writes to value registers one to five&lt;/P&gt;&lt;P&gt;//PMFFEN = 0 // Fault disabled&lt;BR /&gt; // .... (other fault registers)&lt;/P&gt;&lt;P&gt;PMFFQCA = 0; // Reload every PWM, Half-cycle disabled, f core / 1(25Mhz)&lt;/P&gt;&lt;P&gt;PMFMODA = 1250;&lt;BR /&gt; PMFDTMA = 13; //dead time&lt;/P&gt;&lt;P&gt;PMFCFG2 |= 0x3f; // mask all PWM outputs&lt;BR /&gt; PMFOUTC_OUTCTL = 0x3f; // all outputs in Software mode&lt;BR /&gt; &lt;BR /&gt; &lt;BR /&gt; PMFENCA_LDOKA = 1; // apply PMF Modulo value&lt;/P&gt;&lt;P&gt;PMFENCA_RSTRTA = 1; // 1 = PWM restart at commutation event&lt;/P&gt;&lt;P&gt;PMFENCA_PWMENA = 1;&lt;/P&gt;&lt;P&gt;//PMFENCA_PWMRIEA = 1; // Reload Interrupt - Used only for debugging&lt;/P&gt;&lt;P&gt;PMFCFG1_ENCE = 0; // buffered PMFOUTC, PMFOUTB, SWAPx and MSKx (change on commutation event)&lt;/P&gt;&lt;P&gt;PMFENCA_GLDOKA = 1; // 0 = Local LDOKA controls buffered registers / 1 = external Load OK controls buffered registers&lt;BR /&gt; &lt;BR /&gt; MODRR1_PWMPRR =0x01; //PWM router&lt;BR /&gt; MODRR1_PWM54RR = 1;&lt;BR /&gt; MODRR1_PWM32RR = 1;&lt;BR /&gt; MODRR1_PWM10RR = 1;&lt;BR /&gt;}&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 23 Sep 2017 08:45:45 GMT</pubDate>
      <guid>https://community.nxp.com/t5/S12-MagniV-Microcontrollers/PMF-problem-on-power-on/m-p/510311#M12443</guid>
      <dc:creator>sufree</dc:creator>
      <dc:date>2017-09-23T08:45:45Z</dc:date>
    </item>
    <item>
      <title>Re: PMF problem on power-on</title>
      <link>https://community.nxp.com/t5/S12-MagniV-Microcontrollers/PMF-problem-on-power-on/m-p/510312#M12444</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I don't remember everything from this project but for sure in normal mode, you cannot do what you are doing at the end of your function.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;[...]&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #51626f; background-color: #ffffff;"&gt;MODRR1_PWMPRR =0x01; //PWM router &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;lt;--- only this write is executed&lt;/SPAN&gt;&lt;BR style="color: #51626f; background-color: #ffffff;" /&gt;&lt;SPAN style="color: #51626f; background-color: #ffffff;"&gt;MODRR1_PWM54RR = 1; &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;lt;-- no effect&lt;/SPAN&gt;&lt;BR style="color: #51626f; background-color: #ffffff;" /&gt;&lt;SPAN style="color: #51626f; background-color: #ffffff;"&gt;MODRR1_PWM32RR = 1;&lt;SPAN&gt;&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;lt;-- no effect&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;BR style="color: #51626f; background-color: #ffffff;" /&gt;&lt;SPAN style="color: #51626f; background-color: #ffffff;"&gt;MODRR1_PWM10RR = 1;&lt;SPAN&gt;&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;lt;-- no effect&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;From datasheet, I think you should do a write like this:&amp;nbsp;&lt;SPAN style="color: #51626f; background-color: #ffffff;"&gt;MODRR1|=0x0f;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #51626f; background-color: #ffffff;"&gt;Jasmin&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 25 Sep 2017 12:52:21 GMT</pubDate>
      <guid>https://community.nxp.com/t5/S12-MagniV-Microcontrollers/PMF-problem-on-power-on/m-p/510312#M12444</guid>
      <dc:creator>jasminrouleau</dc:creator>
      <dc:date>2017-09-25T12:52:21Z</dc:date>
    </item>
  </channel>
</rss>

