<?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 OPWMCB Mode in eMIOS – Lead vs. Trail Edge in S32K</title>
    <link>https://community.nxp.com/t5/S32K/OPWMCB-Mode-in-eMIOS-Lead-vs-Trail-Edge/m-p/2192574#M53830</link>
    <description>&lt;P&gt;Hi&lt;BR /&gt;I’ve been working with &lt;STRONG&gt;eMIOS PWM IP in OPWMCB mode&lt;/STRONG&gt; and wanted to understand the practical difference between these two configurations:&lt;/P&gt;&lt;UL&gt;&lt;LI&gt;EMIOS_PWM_IP_MODE_OPWMCB_TRAIL_EDGE&lt;/LI&gt;&lt;LI&gt;EMIOS_PWM_IP_MODE_OPWMCB_LEAD_EDGE&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;To investigate, I created a simple test project and observed the output signals. Surprisingly, I couldn’t see any noticeable difference between the two modes on the waveform.&lt;/P&gt;&lt;P&gt;Here’s my setup:&lt;/P&gt;&lt;UL&gt;&lt;LI&gt;&lt;STRONG&gt;Time base:&lt;/STRONG&gt; Channel 23&lt;/LI&gt;&lt;LI&gt;&lt;STRONG&gt;Channels:&lt;/STRONG&gt; CH1 and CH2 generating center-aligned PWM&lt;/LI&gt;&lt;LI&gt;The same time base also triggers the ADC at the middle of the period for current sampling.&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Ayaz_0-1761311654217.png" style="width: 400px;"&gt;&lt;img src="https://community.nxp.com/t5/image/serverpage/image-id/362518i34DF77D3AEBF51A3/image-size/medium?v=v2&amp;amp;px=400" role="button" title="Ayaz_0-1761311654217.png" alt="Ayaz_0-1761311654217.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;My questions:&lt;/P&gt;&lt;OL&gt;&lt;LI&gt;What is the actual difference between these two OPWMCB modes?&lt;/LI&gt;&lt;LI&gt;Under what conditions does this difference become visible?&lt;/LI&gt;&lt;LI&gt;For my design (center-aligned PWM with ADC sampling at mid-period), which mode is best and why?&lt;/LI&gt;&lt;/OL&gt;&lt;P&gt;Looking forward to your insights and explanations!&lt;/P&gt;</description>
    <pubDate>Fri, 24 Oct 2025 13:20:54 GMT</pubDate>
    <dc:creator>Ayaz</dc:creator>
    <dc:date>2025-10-24T13:20:54Z</dc:date>
    <item>
      <title>OPWMCB Mode in eMIOS – Lead vs. Trail Edge</title>
      <link>https://community.nxp.com/t5/S32K/OPWMCB-Mode-in-eMIOS-Lead-vs-Trail-Edge/m-p/2192574#M53830</link>
      <description>&lt;P&gt;Hi&lt;BR /&gt;I’ve been working with &lt;STRONG&gt;eMIOS PWM IP in OPWMCB mode&lt;/STRONG&gt; and wanted to understand the practical difference between these two configurations:&lt;/P&gt;&lt;UL&gt;&lt;LI&gt;EMIOS_PWM_IP_MODE_OPWMCB_TRAIL_EDGE&lt;/LI&gt;&lt;LI&gt;EMIOS_PWM_IP_MODE_OPWMCB_LEAD_EDGE&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;To investigate, I created a simple test project and observed the output signals. Surprisingly, I couldn’t see any noticeable difference between the two modes on the waveform.&lt;/P&gt;&lt;P&gt;Here’s my setup:&lt;/P&gt;&lt;UL&gt;&lt;LI&gt;&lt;STRONG&gt;Time base:&lt;/STRONG&gt; Channel 23&lt;/LI&gt;&lt;LI&gt;&lt;STRONG&gt;Channels:&lt;/STRONG&gt; CH1 and CH2 generating center-aligned PWM&lt;/LI&gt;&lt;LI&gt;The same time base also triggers the ADC at the middle of the period for current sampling.&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Ayaz_0-1761311654217.png" style="width: 400px;"&gt;&lt;img src="https://community.nxp.com/t5/image/serverpage/image-id/362518i34DF77D3AEBF51A3/image-size/medium?v=v2&amp;amp;px=400" role="button" title="Ayaz_0-1761311654217.png" alt="Ayaz_0-1761311654217.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;My questions:&lt;/P&gt;&lt;OL&gt;&lt;LI&gt;What is the actual difference between these two OPWMCB modes?&lt;/LI&gt;&lt;LI&gt;Under what conditions does this difference become visible?&lt;/LI&gt;&lt;LI&gt;For my design (center-aligned PWM with ADC sampling at mid-period), which mode is best and why?&lt;/LI&gt;&lt;/OL&gt;&lt;P&gt;Looking forward to your insights and explanations!&lt;/P&gt;</description>
      <pubDate>Fri, 24 Oct 2025 13:20:54 GMT</pubDate>
      <guid>https://community.nxp.com/t5/S32K/OPWMCB-Mode-in-eMIOS-Lead-vs-Trail-Edge/m-p/2192574#M53830</guid>
      <dc:creator>Ayaz</dc:creator>
      <dc:date>2025-10-24T13:20:54Z</dc:date>
    </item>
    <item>
      <title>Re: OPWMCB Mode in eMIOS – Lead vs. Trail Edge</title>
      <link>https://community.nxp.com/t5/S32K/OPWMCB-Mode-in-eMIOS-Lead-vs-Trail-Edge/m-p/2192779#M53836</link>
      <description>&lt;P&gt;Thank you for your interest in our products and for contributing to our community.&lt;/P&gt;
&lt;P&gt;Regarding your questions:&lt;/P&gt;
&lt;P&gt;1&amp;amp;2 .- The main difference is noted with deadtime insertion. The trail edge mode increasing high time. Alternatively, by selecting the lead edge mode, deadtime insertion decrease high time.&lt;/P&gt;
&lt;P&gt;For more details, please refer to &lt;EM&gt;6.4. OPWMCB example project&lt;/EM&gt; section of &lt;A href="https://community.nxp.com/t5/S32M-Knowledge-Base/S32M27x-S32K3-eMIOS-Usage/ta-p/2129760" target="_blank" rel="noopener"&gt;S32M27x/S32K3 – eMIOS Usage&lt;/A&gt;.&lt;/P&gt;
&lt;P&gt;On the other hand, it &lt;STRONG&gt;could&lt;/STRONG&gt; also affect the flag event (I don't remember having tried it.), and therefore the interrupt and triggering support.&lt;/P&gt;
&lt;P&gt;For reference consult &lt;EM&gt;6.6. PWM design considerations&lt;/EM&gt; section. And please test it on your own taking as reference the &lt;EM&gt;6.1 OPWMB example project&lt;/EM&gt;.&lt;/P&gt;
&lt;P&gt;3.- Such topic is addressed in &lt;A href="https://community.nxp.com/t5/S32K/Design-Strategy-for-Complementary-PWM-Generation-for-motor/td-p/2170567" target="_blank" rel="noopener"&gt;https://community.nxp.com/t5/S32K/Design-Strategy-for-Complementary-PWM-Generation-for-motor/td-p/2170567&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;I hope this information is helpful.&lt;/P&gt;</description>
      <pubDate>Fri, 24 Oct 2025 21:45:57 GMT</pubDate>
      <guid>https://community.nxp.com/t5/S32K/OPWMCB-Mode-in-eMIOS-Lead-vs-Trail-Edge/m-p/2192779#M53836</guid>
      <dc:creator>_Leo_</dc:creator>
      <dc:date>2025-10-24T21:45:57Z</dc:date>
    </item>
  </channel>
</rss>

