<?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 some example about the FOC dead-time compensation？my mcu is s12ZVML128，andI setPMFCCTL_ISENS = 0x10; in S12 / MagniV Microcontrollers</title>
    <link>https://community.nxp.com/t5/S12-MagniV-Microcontrollers/some-example-about-the-FOC-dead-time-compensation-my-mcu-is/m-p/1202066#M17643</link>
    <description>&lt;P&gt;hi。&lt;/P&gt;&lt;P&gt;i have some questions about the dead-time compensation？my mcu is s12ZVML128，&lt;/P&gt;&lt;P&gt;I tried the current zero crossing detection compensation and register detection compensation method, the effect is not good, request help, thank you&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;Thanks!&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;void pmf_init(void)&lt;BR /&gt;{&lt;BR /&gt;PMFCFG2_REV0 = 1; // 01 PWM generator A generates reload event.&lt;BR /&gt;PMFCFG2_REV1 = 0;&lt;BR /&gt;&lt;BR /&gt;PMFMODA = 2500; // pwm frequency to be 20 kHz&lt;BR /&gt;PMFDTMA = MOS_DEAD_TIME; // dead time of pmf to be 0.75 us&lt;BR /&gt;&lt;BR /&gt;PMFCCTL_ISENS = 0x10; // 死区补偿方法&lt;BR /&gt;&lt;BR /&gt;PMFVAL0 = PMFMODA &amp;gt;&amp;gt; 1; // set the output duty to be 50%&lt;BR /&gt;PMFVAL2 = PMFMODA &amp;gt;&amp;gt; 1;&lt;BR /&gt;PMFVAL4 = PMFMODA &amp;gt;&amp;gt; 1;&lt;BR /&gt;&lt;BR /&gt;PMFENCA_LDOKA = 1; // apply PMF Modulo value&lt;BR /&gt;&lt;BR /&gt;PMFICCTL_PECx = 0x7; // Enable Double Switching&lt;BR /&gt;PMFCINV = 0x15;&lt;BR /&gt;&lt;BR /&gt;PMFCFG2_MSK = 0x3F; // Disable PWM at the output&lt;BR /&gt;&lt;BR /&gt;PMFENCA_PWMENA = 1; // Enable PWM&lt;BR /&gt;&lt;BR /&gt;PMFENCA_PWMRIEA = 1; // Reload Interrupt - Used for sampling period generation&lt;BR /&gt;&lt;BR /&gt;PMFENCA_GLDOKA = 1; // 0 = Local LDOKA controls buffered registers / 1 = external Load OK controls buffered registers&lt;BR /&gt;PMFFQCA_LDFQA = 1; // Reload every TWO PWM, 10KHZ,page588&lt;BR /&gt;}&lt;/SPAN&gt;&lt;/P&gt;</description>
    <pubDate>Fri, 25 Dec 2020 00:27:57 GMT</pubDate>
    <dc:creator>Clarkhe</dc:creator>
    <dc:date>2020-12-25T00:27:57Z</dc:date>
    <item>
      <title>some example about the FOC dead-time compensation？my mcu is s12ZVML128，andI setPMFCCTL_ISENS = 0x10;</title>
      <link>https://community.nxp.com/t5/S12-MagniV-Microcontrollers/some-example-about-the-FOC-dead-time-compensation-my-mcu-is/m-p/1202066#M17643</link>
      <description>&lt;P&gt;hi。&lt;/P&gt;&lt;P&gt;i have some questions about the dead-time compensation？my mcu is s12ZVML128，&lt;/P&gt;&lt;P&gt;I tried the current zero crossing detection compensation and register detection compensation method, the effect is not good, request help, thank you&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;Thanks!&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;void pmf_init(void)&lt;BR /&gt;{&lt;BR /&gt;PMFCFG2_REV0 = 1; // 01 PWM generator A generates reload event.&lt;BR /&gt;PMFCFG2_REV1 = 0;&lt;BR /&gt;&lt;BR /&gt;PMFMODA = 2500; // pwm frequency to be 20 kHz&lt;BR /&gt;PMFDTMA = MOS_DEAD_TIME; // dead time of pmf to be 0.75 us&lt;BR /&gt;&lt;BR /&gt;PMFCCTL_ISENS = 0x10; // 死区补偿方法&lt;BR /&gt;&lt;BR /&gt;PMFVAL0 = PMFMODA &amp;gt;&amp;gt; 1; // set the output duty to be 50%&lt;BR /&gt;PMFVAL2 = PMFMODA &amp;gt;&amp;gt; 1;&lt;BR /&gt;PMFVAL4 = PMFMODA &amp;gt;&amp;gt; 1;&lt;BR /&gt;&lt;BR /&gt;PMFENCA_LDOKA = 1; // apply PMF Modulo value&lt;BR /&gt;&lt;BR /&gt;PMFICCTL_PECx = 0x7; // Enable Double Switching&lt;BR /&gt;PMFCINV = 0x15;&lt;BR /&gt;&lt;BR /&gt;PMFCFG2_MSK = 0x3F; // Disable PWM at the output&lt;BR /&gt;&lt;BR /&gt;PMFENCA_PWMENA = 1; // Enable PWM&lt;BR /&gt;&lt;BR /&gt;PMFENCA_PWMRIEA = 1; // Reload Interrupt - Used for sampling period generation&lt;BR /&gt;&lt;BR /&gt;PMFENCA_GLDOKA = 1; // 0 = Local LDOKA controls buffered registers / 1 = external Load OK controls buffered registers&lt;BR /&gt;PMFFQCA_LDFQA = 1; // Reload every TWO PWM, 10KHZ,page588&lt;BR /&gt;}&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Fri, 25 Dec 2020 00:27:57 GMT</pubDate>
      <guid>https://community.nxp.com/t5/S12-MagniV-Microcontrollers/some-example-about-the-FOC-dead-time-compensation-my-mcu-is/m-p/1202066#M17643</guid>
      <dc:creator>Clarkhe</dc:creator>
      <dc:date>2020-12-25T00:27:57Z</dc:date>
    </item>
    <item>
      <title>Re: some example about the FOC dead-time compensation？my mcu is s12ZVML128，andI setPMFCCTL_ISENS = 0</title>
      <link>https://community.nxp.com/t5/S12-MagniV-Microcontrollers/some-example-about-the-FOC-dead-time-compensation-my-mcu-is/m-p/1202068#M17644</link>
      <description>&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="IMG_2109.JPG" style="width: 749px;"&gt;&lt;img src="https://community.nxp.com/t5/image/serverpage/image-id/133130iB5EC21EC3A1DECEA/image-size/large?v=v2&amp;amp;px=999" role="button" title="IMG_2109.JPG" alt="IMG_2109.JPG" /&gt;&lt;/span&gt;&lt;/P&gt;</description>
      <pubDate>Mon, 21 Dec 2020 00:24:09 GMT</pubDate>
      <guid>https://community.nxp.com/t5/S12-MagniV-Microcontrollers/some-example-about-the-FOC-dead-time-compensation-my-mcu-is/m-p/1202068#M17644</guid>
      <dc:creator>Clarkhe</dc:creator>
      <dc:date>2020-12-21T00:24:09Z</dc:date>
    </item>
    <item>
      <title>Re: some questionabout the dead-time compensation？my mcu is s12ZVML128</title>
      <link>https://community.nxp.com/t5/S12-MagniV-Microcontrollers/some-example-about-the-FOC-dead-time-compensation-my-mcu-is/m-p/1204185#M17651</link>
      <description>&lt;P&gt;/* 死区补偿 -寄存器换向标志位检测换向 */&lt;BR /&gt;if(PMFDTMS_DT0 == 0)//正电流&lt;BR /&gt;{&lt;BR /&gt;f16pwm-&amp;gt;f16Arg1 = MLIB_AddSat_F16(f16pwm-&amp;gt;f16Arg1, DeadTime_H);&lt;BR /&gt;}&lt;BR /&gt;if(PMFDTMS_DT1 == 1)//负电流&lt;BR /&gt;{&lt;BR /&gt;f16pwm-&amp;gt;f16Arg1 = MLIB_SubSat_F16(f16pwm-&amp;gt;f16Arg1, DeadTime_L);&lt;BR /&gt;}&lt;BR /&gt;if(PMFDTMS_DT2 == 0)//正电流&lt;BR /&gt;{&lt;BR /&gt;f16pwm-&amp;gt;f16Arg2 = MLIB_AddSat_F16(f16pwm-&amp;gt;f16Arg2, DeadTime_H);&lt;BR /&gt;}&lt;BR /&gt;if(PMFDTMS_DT3 == 1)//负电流&lt;BR /&gt;{&lt;BR /&gt;f16pwm-&amp;gt;f16Arg2 = MLIB_SubSat_F16(f16pwm-&amp;gt;f16Arg2, DeadTime_L);&lt;BR /&gt;}&lt;BR /&gt;if(PMFDTMS_DT4 == 0)//正电流&lt;BR /&gt;{&lt;BR /&gt;f16pwm-&amp;gt;f16Arg3 = MLIB_AddSat_F16(f16pwm-&amp;gt;f16Arg3, DeadTime_H);&lt;BR /&gt;}&lt;BR /&gt;if(PMFDTMS_DT5 == 1)//负电流&lt;BR /&gt;{&lt;BR /&gt;f16pwm-&amp;gt;f16Arg3 = MLIB_SubSat_F16(f16pwm-&amp;gt;f16Arg3, DeadTime_L);&lt;BR /&gt;}&lt;/P&gt;</description>
      <pubDate>Fri, 25 Dec 2020 00:21:32 GMT</pubDate>
      <guid>https://community.nxp.com/t5/S12-MagniV-Microcontrollers/some-example-about-the-FOC-dead-time-compensation-my-mcu-is/m-p/1204185#M17651</guid>
      <dc:creator>Clarkhe</dc:creator>
      <dc:date>2020-12-25T00:21:32Z</dc:date>
    </item>
    <item>
      <title>Re: some questionabout the dead-time compensation？my mcu is s12ZVML128</title>
      <link>https://community.nxp.com/t5/S12-MagniV-Microcontrollers/some-example-about-the-FOC-dead-time-compensation-my-mcu-is/m-p/1204187#M17652</link>
      <description>&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="QQ图片20201225082305.jpg" style="width: 999px;"&gt;&lt;img src="https://community.nxp.com/t5/image/serverpage/image-id/133508i692935CF22C3119E/image-size/large?v=v2&amp;amp;px=999" role="button" title="QQ图片20201225082305.jpg" alt="QQ图片20201225082305.jpg" /&gt;&lt;/span&gt;&lt;/P&gt;</description>
      <pubDate>Fri, 25 Dec 2020 00:24:21 GMT</pubDate>
      <guid>https://community.nxp.com/t5/S12-MagniV-Microcontrollers/some-example-about-the-FOC-dead-time-compensation-my-mcu-is/m-p/1204187#M17652</guid>
      <dc:creator>Clarkhe</dc:creator>
      <dc:date>2020-12-25T00:24:21Z</dc:date>
    </item>
    <item>
      <title>Re: some questionabout the dead-time compensation？my mcu is s12ZVML128</title>
      <link>https://community.nxp.com/t5/S12-MagniV-Microcontrollers/some-example-about-the-FOC-dead-time-compensation-my-mcu-is/m-p/1204189#M17653</link>
      <description>&lt;P&gt;Current waveform after dead time compensation&lt;/P&gt;</description>
      <pubDate>Fri, 25 Dec 2020 00:26:06 GMT</pubDate>
      <guid>https://community.nxp.com/t5/S12-MagniV-Microcontrollers/some-example-about-the-FOC-dead-time-compensation-my-mcu-is/m-p/1204189#M17653</guid>
      <dc:creator>Clarkhe</dc:creator>
      <dc:date>2020-12-25T00:26:06Z</dc:date>
    </item>
    <item>
      <title>Re: some example about the FOC dead-time compensation？my mcu is s12ZVML128，andI setPMFCCTL_ISENS = 0</title>
      <link>https://community.nxp.com/t5/S12-MagniV-Microcontrollers/some-example-about-the-FOC-dead-time-compensation-my-mcu-is/m-p/1204190#M17654</link>
      <description>&lt;P&gt;Current waveform before dead time compensation&lt;/P&gt;</description>
      <pubDate>Fri, 25 Dec 2020 00:26:36 GMT</pubDate>
      <guid>https://community.nxp.com/t5/S12-MagniV-Microcontrollers/some-example-about-the-FOC-dead-time-compensation-my-mcu-is/m-p/1204190#M17654</guid>
      <dc:creator>Clarkhe</dc:creator>
      <dc:date>2020-12-25T00:26:36Z</dc:date>
    </item>
    <item>
      <title>Re: some example about the FOC dead-time compensation？my mcu is s12ZVML128，andI setPMFCCTL_ISENS = 0</title>
      <link>https://community.nxp.com/t5/S12-MagniV-Microcontrollers/some-example-about-the-FOC-dead-time-compensation-my-mcu-is/m-p/1206046#M17658</link>
      <description>&lt;P&gt;Hello,&lt;/P&gt;
&lt;P&gt;I believe there is a mistake in the assignment:&lt;/P&gt;
&lt;BLOCKQUOTE&gt;&lt;HR /&gt;&lt;SPAN&gt;PMFCCTL_ISENS = 0x10; // assigning hex number of 0x10, leading to 0b000010000 being assigned to two-bit fieldIf you&lt;/SPAN&gt;&lt;/BLOCKQUOTE&gt;
&lt;P&gt;If your intention is to use mode 10 (Current status sample correction on inputs IS0, IS1, and IS2 during deadtime), please use&lt;/P&gt;
&lt;BLOCKQUOTE&gt;&lt;HR /&gt;PMFCCTL_ISENS = 0b10;&lt;/BLOCKQUOTE&gt;
&lt;P&gt;&lt;SPAN&gt;or&lt;/SPAN&gt;&lt;/P&gt;
&lt;BLOCKQUOTE&gt;&lt;HR /&gt;PMFCCTL_ISENS = 0x02;&lt;/BLOCKQUOTE&gt;
&lt;P&gt;&lt;SPAN&gt;or&lt;/SPAN&gt;&lt;/P&gt;
&lt;BLOCKQUOTE&gt;&lt;HR /&gt;PMFCCTL = 0x20;&lt;/BLOCKQUOTE&gt;
&lt;P&gt;&lt;SPAN&gt;instead.&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;Let me know if it works for you.&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;Best regards,&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;Matej&lt;/P&gt;</description>
      <pubDate>Mon, 04 Jan 2021 09:45:25 GMT</pubDate>
      <guid>https://community.nxp.com/t5/S12-MagniV-Microcontrollers/some-example-about-the-FOC-dead-time-compensation-my-mcu-is/m-p/1206046#M17658</guid>
      <dc:creator>pachamatej</dc:creator>
      <dc:date>2021-01-04T09:45:25Z</dc:date>
    </item>
  </channel>
</rss>

