<?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: eMIOS OPWFMB mode initialization using S32DS SDK in S32 Design Studio</title>
    <link>https://community.nxp.com/t5/S32-Design-Studio/eMIOS-OPWFMB-mode-initialization-using-S32DS-SDK/m-p/874444#M4529</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi &lt;A class="jx-jive-macro-user" href="https://community.nxp.com/people/truongtranvan"&gt;truongtranvan&lt;/A&gt;‌,&lt;/P&gt;&lt;P&gt;I apologize for not noticing earlier that there is a discrepancy between how the GPIO mode clears the count register and what is a valid value for the register in OPWFMB mode. The register is cleared in GPIO mode, but the OPWFMB mode requires that it be initialized to a value between 1 and the value of the B1 register. Having GPIO mode initialize it to 0 does not meet this requirement. In this case I believe that an explicit CNT register initialization is necessary.&lt;/P&gt;&lt;P&gt;Thank you,&lt;/P&gt;&lt;P&gt;Dan&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Mon, 11 Feb 2019 18:42:20 GMT</pubDate>
    <dc:creator>dan_teodorescu</dc:creator>
    <dc:date>2019-02-11T18:42:20Z</dc:date>
    <item>
      <title>eMIOS OPWFMB mode initialization using S32DS SDK</title>
      <link>https://community.nxp.com/t5/S32-Design-Studio/eMIOS-OPWFMB-mode-initialization-using-S32DS-SDK/m-p/874439#M4524</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello,&lt;/P&gt;&lt;P&gt;The MPC5777C Reference Manual recommends initializing the eMIOS UC counter (CNT register) to a value between 1 and the period (B register). From MPC5777CRM section 36.6.1.1.14:&lt;/P&gt;&lt;BLOCKQUOTE class="jive_macro_quote jive-quote jive_text_macro"&gt;&lt;P&gt;&lt;/P&gt;When entering OPWFMB mode coming out of GPIO mode, the internal counter value is&lt;BR /&gt;not within that range then the B match will not occur causing the channel internal counter&lt;BR /&gt;to wrap at the maximum counter value which is 0xff_ffff for a 24-bit counter. After the&lt;BR /&gt;counter wrap occurs it returns to 0x1 and resume normal OPWFMB mode operation.&lt;BR /&gt;Thus in order to avoid the counter wrap condition make sure its value is within the 0x1 to&lt;BR /&gt;B1 register value range when the OPWFMB mode is entered.&lt;/BLOCKQUOTE&gt;&lt;P&gt;The S32DS SDK eMIOS PWM driver does not appear to explicitly set the CNT register during initialization (EMIOS_DRV_PWM_InitMode() and downstream functions). Is this intentional or should the SDK driver be updated to address the reference manual requirement?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 15 Jan 2019 01:19:06 GMT</pubDate>
      <guid>https://community.nxp.com/t5/S32-Design-Studio/eMIOS-OPWFMB-mode-initialization-using-S32DS-SDK/m-p/874439#M4524</guid>
      <dc:creator>dan_teodorescu</dc:creator>
      <dc:date>2019-01-15T01:19:06Z</dc:date>
    </item>
    <item>
      <title>Re: eMIOS OPWFMB mode initialization using S32DS SDK</title>
      <link>https://community.nxp.com/t5/S32-Design-Studio/eMIOS-OPWFMB-mode-initialization-using-S32DS-SDK/m-p/874440#M4525</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi &lt;A class="jx-jive-macro-user" href="https://community.nxp.com/people/dan.teodorescu"&gt;dan.teodorescu&lt;/A&gt;‌,&lt;/P&gt;&lt;P&gt;In the &lt;SPAN style="color: #51626f; background-color: #ffffff;"&gt;MPC5777CRM wrote that:&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;1. T&lt;SPAN style="color: #51626f; background-color: #ffffff;"&gt;he eMIOS UC counter (CNT register) is a read-only register =&amp;gt; It mean we cannot set value for them.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #51626f; background-color: #ffffff;"&gt;2.&amp;nbsp; &lt;SPAN class=""&gt;When entering another operation mode,&amp;nbsp;this register is automatically cleared.&lt;/SPAN&gt;&lt;BR style="font-weight: normal;" /&gt; &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #51626f; background-color: #ffffff;"&gt;&lt;SPAN class=""&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #51626f; background-color: #ffffff;"&gt;&lt;SPAN class=""&gt;So,&amp;nbsp;eMIOS_PWM driver cannot set value for CNT register during initialization for OPWFMB mode. Further, the function&amp;nbsp;&lt;SPAN style="background-color: #ffffff; color: #51626f; font-size: 16px;"&gt;EMIOS_DRV_PWM_InitMode() has set value for B register before entering OPWFMB mode with the desire to avoid the above problem.&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #51626f; background-color: #ffffff;"&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #51626f; background-color: #ffffff;"&gt;&lt;SPAN style="background-color: #ffffff; color: #51626f; font-size: 16px;"&gt;Thanks &amp;amp; Best regards,&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #51626f; background-color: #ffffff;"&gt;&lt;SPAN style="background-color: #ffffff; color: #51626f; font-size: 16px;"&gt;Truong Tran.&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 15 Jan 2019 10:01:01 GMT</pubDate>
      <guid>https://community.nxp.com/t5/S32-Design-Studio/eMIOS-OPWFMB-mode-initialization-using-S32DS-SDK/m-p/874440#M4525</guid>
      <dc:creator>truongtranvan</dc:creator>
      <dc:date>2019-01-15T10:01:01Z</dc:date>
    </item>
    <item>
      <title>Re: eMIOS OPWFMB mode initialization using S32DS SDK</title>
      <link>https://community.nxp.com/t5/S32-Design-Studio/eMIOS-OPWFMB-mode-initialization-using-S32DS-SDK/m-p/874441#M4526</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi &lt;A class="jx-jive-macro-user" href="https://community.nxp.com/people/truongtranvan"&gt;truongtranvan&lt;/A&gt;‌,&lt;/P&gt;&lt;P&gt;I found the description you mentioned regarding the CNT register being read-only in non GPIO mode, in MPC5777CRM section 36.5.3 (page1399). However, the same section claims "&lt;EM&gt;When entering some operation modes, this register is automatically cleared (refer to the “UC Modes of Operation” section for details).&lt;/EM&gt;"&lt;/P&gt;&lt;P&gt;However, the only note on this topic in the OPWFMB mode, is what I stated in my original post "&lt;EM&gt;...&lt;SPAN style="text-align: left; color: #51626f; text-transform: none; text-indent: 0px; letter-spacing: normal; font-family: arial,helvetica,'helvetica neue',verdana,sans-serif; font-size: 15px; font-variant: normal; font-weight: 400; text-decoration: none; word-spacing: 0px; display: inline !important; white-space: normal; orphans: 2; float: none; -webkit-text-stroke-width: 0px; background-color: #f6f6f6;"&gt;Thus in order to avoid the counter wrap condition make sure its value is within the 0x1 to &lt;/SPAN&gt;&lt;SPAN style="text-align: left; color: #51626f; text-transform: none; text-indent: 0px; letter-spacing: normal; font-family: arial,helvetica,'helvetica neue',verdana,sans-serif; font-size: 15px; font-variant: normal; font-weight: 400; text-decoration: none; word-spacing: 0px; display: inline !important; white-space: normal; orphans: 2; float: none; -webkit-text-stroke-width: 0px; background-color: #f6f6f6;"&gt;B1 register value range when the OPWFMB mode is entered.&lt;/SPAN&gt;&lt;/EM&gt;"&lt;/P&gt;&lt;P&gt;We use this code in a safety-critical application so it is essential that the eMIOS perform correctly. Would it make sense to update the PWM driver to initialize the CNT register prior to entering the OPWFMB, by calling&amp;nbsp;&lt;SPAN style="display: inline !important; float: none; background-color: transparent; color: #3d3d3d; font-family: Helvetica Neue,Helvetica,Arial,Lucida Grande,sans-serif; font-size: 15px; font-style: normal; font-variant: normal; font-weight: 400; letter-spacing: normal; orphans: 2; text-align: left; text-decoration: none; text-indent: 0px; text-transform: none; -webkit-text-stroke-width: 0px; white-space: pre; word-spacing: 0px;"&gt;EMIOS_SetUCRegCNT&lt;/SPAN&gt;() as shown below?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;DIV style="color: #d4d4d4; background-color: #1e1e1e; font-family: Consolas, 'Courier New', monospace; font-weight: normal; font-size: 14px; line-height: 19px; white-space: pre;"&gt;&lt;DIV&gt;&lt;SPAN style="color: #569cd6;"&gt;static&lt;/SPAN&gt;&lt;SPAN style="color: #d4d4d4;"&gt; &lt;/SPAN&gt;&lt;SPAN style="color: #4ec9b0;"&gt;status_t&lt;/SPAN&gt;&lt;SPAN style="color: #d4d4d4;"&gt; &lt;/SPAN&gt;&lt;SPAN style="color: #dcdcaa;"&gt;EMIOS_DRV_PWM_InitPeriodDutyCycleMode&lt;/SPAN&gt;&lt;SPAN style="color: #d4d4d4;"&gt;(&lt;/SPAN&gt;&lt;SPAN style="color: #4ec9b0;"&gt;uint8_t&lt;/SPAN&gt;&lt;SPAN style="color: #d4d4d4;"&gt; emiosGroup,&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN style="color: #d4d4d4;"&gt; &lt;/SPAN&gt;&lt;SPAN style="color: #4ec9b0;"&gt;uint8_t&lt;/SPAN&gt;&lt;SPAN style="color: #d4d4d4;"&gt; channel,&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN style="color: #d4d4d4;"&gt; &lt;/SPAN&gt;&lt;SPAN style="color: #4ec9b0;"&gt;emios_opwfm_param_t&lt;/SPAN&gt;&lt;SPAN style="color: #d4d4d4;"&gt; &lt;/SPAN&gt;&lt;SPAN style="color: #d4d4d4;"&gt;*&lt;/SPAN&gt;&lt;SPAN style="color: #d4d4d4;"&gt;opwfmParam)&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN style="color: #d4d4d4;"&gt;{&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN style="color: #d4d4d4;"&gt; &lt;/SPAN&gt;&lt;SPAN style="color: #4ec9b0;"&gt;uint8_t&lt;/SPAN&gt;&lt;SPAN style="color: #d4d4d4;"&gt; restChannel &lt;/SPAN&gt;&lt;SPAN style="color: #d4d4d4;"&gt;=&lt;/SPAN&gt;&lt;SPAN style="color: #d4d4d4;"&gt; &lt;/SPAN&gt;&lt;SPAN style="color: #b5cea8;"&gt;0U&lt;/SPAN&gt;&lt;SPAN style="color: #d4d4d4;"&gt;;&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN style="color: #d4d4d4;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;/SPAN&gt;&lt;SPAN style="color: #569cd6;"&gt;bool&lt;/SPAN&gt;&lt;SPAN style="color: #d4d4d4;"&gt; restValidate &lt;/SPAN&gt;&lt;SPAN style="color: #d4d4d4;"&gt;=&lt;/SPAN&gt;&lt;SPAN style="color: #d4d4d4;"&gt; &lt;/SPAN&gt;&lt;SPAN style="color: #dcdcaa;"&gt;EMIOS_ValidateChannel&lt;/SPAN&gt;&lt;SPAN style="color: #d4d4d4;"&gt;(channel, &lt;/SPAN&gt;&lt;SPAN style="color: #d4d4d4;"&gt;&amp;amp;&lt;/SPAN&gt;&lt;SPAN style="color: #d4d4d4;"&gt;restChannel);&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN style="color: #d4d4d4;"&gt; &lt;/SPAN&gt;&lt;SPAN style="color: #dcdcaa;"&gt;DEV_ASSERT&lt;/SPAN&gt;&lt;SPAN style="color: #d4d4d4;"&gt;(emiosGroup &lt;/SPAN&gt;&lt;SPAN style="color: #d4d4d4;"&gt;&amp;lt;&lt;/SPAN&gt;&lt;SPAN style="color: #d4d4d4;"&gt; EMIOS_NUMBER_GROUP_MAX);&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN style="color: #d4d4d4;"&gt; &lt;/SPAN&gt;&lt;SPAN style="color: #dcdcaa;"&gt;DEV_ASSERT&lt;/SPAN&gt;&lt;SPAN style="color: #d4d4d4;"&gt;(restValidate &lt;/SPAN&gt;&lt;SPAN style="color: #d4d4d4;"&gt;==&lt;/SPAN&gt;&lt;SPAN style="color: #d4d4d4;"&gt; &lt;/SPAN&gt;&lt;SPAN style="color: #569cd6;"&gt;true&lt;/SPAN&gt;&lt;SPAN style="color: #d4d4d4;"&gt;);&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN style="color: #d4d4d4;"&gt; &lt;/SPAN&gt;&lt;SPAN style="color: #dcdcaa;"&gt;DEV_ASSERT&lt;/SPAN&gt;&lt;SPAN style="color: #d4d4d4;"&gt;(opwfmParam &lt;/SPAN&gt;&lt;SPAN style="color: #d4d4d4;"&gt;!=&lt;/SPAN&gt;&lt;SPAN style="color: #d4d4d4;"&gt; &lt;/SPAN&gt;&lt;SPAN style="color: #569cd6;"&gt;NULL&lt;/SPAN&gt;&lt;SPAN style="color: #d4d4d4;"&gt;);&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN style="color: #d4d4d4;"&gt; &lt;/SPAN&gt;&lt;SPAN style="color: #dcdcaa;"&gt;DEV_ASSERT&lt;/SPAN&gt;&lt;SPAN style="color: #d4d4d4;"&gt;((opwfmParam-&amp;gt;&lt;/SPAN&gt;&lt;SPAN style="color: #9cdcfe;"&gt;mode&lt;/SPAN&gt;&lt;SPAN style="color: #d4d4d4;"&gt; &lt;/SPAN&gt;&lt;SPAN style="color: #d4d4d4;"&gt;==&lt;/SPAN&gt;&lt;SPAN style="color: #d4d4d4;"&gt; EMIOS_MODE_OPWFMB_FLAGX1) &lt;/SPAN&gt;&lt;SPAN style="color: #d4d4d4;"&gt;||&lt;/SPAN&gt;&lt;SPAN style="color: #d4d4d4;"&gt; &lt;/SPAN&gt;&lt;SPAN style="color: #d7ba7d;"&gt;\&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN style="color: #d4d4d4;"&gt; (opwfmParam-&amp;gt;&lt;/SPAN&gt;&lt;SPAN style="color: #9cdcfe;"&gt;mode&lt;/SPAN&gt;&lt;SPAN style="color: #d4d4d4;"&gt; &lt;/SPAN&gt;&lt;SPAN style="color: #d4d4d4;"&gt;==&lt;/SPAN&gt;&lt;SPAN style="color: #d4d4d4;"&gt; EMIOS_MODE_OPWFMB_FLAGX2));&lt;/SPAN&gt;&lt;/DIV&gt;&lt;BR /&gt;&lt;DIV&gt;&lt;SPAN style="color: #d4d4d4;"&gt; &lt;/SPAN&gt;&lt;SPAN style="color: #6a9955;"&gt;/* Validate opwfm parametter */&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN style="color: #d4d4d4;"&gt; &lt;/SPAN&gt;&lt;SPAN style="color: #dcdcaa;"&gt;DEV_ASSERT&lt;/SPAN&gt;&lt;SPAN style="color: #d4d4d4;"&gt;((opwfmParam-&amp;gt;&lt;/SPAN&gt;&lt;SPAN style="color: #9cdcfe;"&gt;periodCount&lt;/SPAN&gt;&lt;SPAN style="color: #d4d4d4;"&gt; &lt;/SPAN&gt;&lt;SPAN style="color: #d4d4d4;"&gt;&amp;lt;=&lt;/SPAN&gt;&lt;SPAN style="color: #d4d4d4;"&gt; EMIOS_OPWFMB_MAX_CNT_VAL) &lt;/SPAN&gt;&lt;SPAN style="color: #d4d4d4;"&gt;&amp;amp;&amp;amp;&lt;/SPAN&gt;&lt;SPAN style="color: #d4d4d4;"&gt; &lt;/SPAN&gt;&lt;SPAN style="color: #d7ba7d;"&gt;\&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN style="color: #d4d4d4;"&gt; (opwfmParam-&amp;gt;&lt;/SPAN&gt;&lt;SPAN style="color: #9cdcfe;"&gt;periodCount&lt;/SPAN&gt;&lt;SPAN style="color: #d4d4d4;"&gt; &lt;/SPAN&gt;&lt;SPAN style="color: #d4d4d4;"&gt;&amp;gt;&lt;/SPAN&gt;&lt;SPAN style="color: #d4d4d4;"&gt; EMIOS_OPWFMB_MIN_CNT_VAL));&lt;/SPAN&gt;&lt;/DIV&gt;&lt;BR /&gt;&lt;DIV&gt;&lt;SPAN style="color: #d4d4d4;"&gt; &lt;/SPAN&gt;&lt;SPAN style="color: #dcdcaa;"&gt;DEV_ASSERT&lt;/SPAN&gt;&lt;SPAN style="color: #d4d4d4;"&gt;(opwfmParam-&amp;gt;&lt;/SPAN&gt;&lt;SPAN style="color: #9cdcfe;"&gt;dutyCycleCount&lt;/SPAN&gt;&lt;SPAN style="color: #d4d4d4;"&gt; &lt;/SPAN&gt;&lt;SPAN style="color: #d4d4d4;"&gt;&amp;lt;=&lt;/SPAN&gt;&lt;SPAN style="color: #d4d4d4;"&gt; opwfmParam-&amp;gt;&lt;/SPAN&gt;&lt;SPAN style="color: #9cdcfe;"&gt;periodCount&lt;/SPAN&gt;&lt;SPAN style="color: #d4d4d4;"&gt;);&lt;/SPAN&gt;&lt;/DIV&gt;&lt;BR /&gt;&lt;DIV&gt;&lt;SPAN style="color: #d4d4d4;"&gt; &lt;/SPAN&gt;&lt;SPAN style="color: #6a9955;"&gt;/* Valid Opwfmb with channels supported */&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN style="color: #d4d4d4;"&gt; &lt;/SPAN&gt;&lt;SPAN style="color: #c586c0;"&gt;if&lt;/SPAN&gt;&lt;SPAN style="color: #d4d4d4;"&gt; (&lt;/SPAN&gt;&lt;SPAN style="color: #dcdcaa;"&gt;EMIOS_ValidateMode&lt;/SPAN&gt;&lt;SPAN style="color: #d4d4d4;"&gt;(emiosGroup, restChannel, (&lt;/SPAN&gt;&lt;SPAN style="color: #4ec9b0;"&gt;uint8_t&lt;/SPAN&gt;&lt;SPAN style="color: #d4d4d4;"&gt;)EMIOS_GMODE_OPWFMB) &lt;/SPAN&gt;&lt;SPAN style="color: #d4d4d4;"&gt;==&lt;/SPAN&gt;&lt;SPAN style="color: #d4d4d4;"&gt; &lt;/SPAN&gt;&lt;SPAN style="color: #569cd6;"&gt;false&lt;/SPAN&gt;&lt;SPAN style="color: #d4d4d4;"&gt;)&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN style="color: #d4d4d4;"&gt; {&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN style="color: #d4d4d4;"&gt; &lt;/SPAN&gt;&lt;SPAN style="color: #dcdcaa;"&gt;DEV_ASSERT&lt;/SPAN&gt;&lt;SPAN style="color: #d4d4d4;"&gt;(&lt;/SPAN&gt;&lt;SPAN style="color: #569cd6;"&gt;false&lt;/SPAN&gt;&lt;SPAN style="color: #d4d4d4;"&gt;);&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN style="color: #d4d4d4;"&gt; }&lt;/SPAN&gt;&lt;/DIV&gt;&lt;BR /&gt;&lt;DIV&gt;&lt;SPAN style="color: #d4d4d4;"&gt; &lt;/SPAN&gt;&lt;SPAN style="color: #6a9955;"&gt;/* Configure registers */&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN style="color: #d4d4d4;"&gt; eMIOS[emiosGroup]-&amp;gt;&lt;/SPAN&gt;&lt;SPAN style="color: #9cdcfe;"&gt;UC&lt;/SPAN&gt;&lt;SPAN style="color: #d4d4d4;"&gt;[restChannel].&lt;/SPAN&gt;&lt;SPAN style="color: #9cdcfe;"&gt;C&lt;/SPAN&gt;&lt;SPAN style="color: #d4d4d4;"&gt; &lt;/SPAN&gt;&lt;SPAN style="color: #d4d4d4;"&gt;=&lt;/SPAN&gt;&lt;SPAN style="color: #d4d4d4;"&gt; &lt;/SPAN&gt;&lt;SPAN style="color: #b5cea8;"&gt;0UL&lt;/SPAN&gt;&lt;SPAN style="color: #d4d4d4;"&gt;; &lt;/SPAN&gt;&lt;SPAN style="color: #6a9955;"&gt;/* Disable channel pre-scaler (reset default) */&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN style="color: #d4d4d4;"&gt; &lt;/SPAN&gt;&lt;SPAN style="color: #c586c0;"&gt;if&lt;/SPAN&gt;&lt;SPAN style="color: #d4d4d4;"&gt; ((&lt;/SPAN&gt;&lt;SPAN style="color: #4ec9b0;"&gt;uint8_t&lt;/SPAN&gt;&lt;SPAN style="color: #d4d4d4;"&gt;)opwfmParam-&amp;gt;&lt;/SPAN&gt;&lt;SPAN style="color: #9cdcfe;"&gt;outputActiveMode&lt;/SPAN&gt;&lt;SPAN style="color: #d4d4d4;"&gt; &lt;/SPAN&gt;&lt;SPAN style="color: #d4d4d4;"&gt;==&lt;/SPAN&gt;&lt;SPAN style="color: #d4d4d4;"&gt; (&lt;/SPAN&gt;&lt;SPAN style="color: #4ec9b0;"&gt;uint8_t&lt;/SPAN&gt;&lt;SPAN style="color: #d4d4d4;"&gt;)EMIOS_NEGATIVE_PULSE)&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN style="color: #d4d4d4;"&gt; {&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN style="color: #d4d4d4;"&gt; &lt;/SPAN&gt;&lt;SPAN style="color: #dcdcaa;"&gt;EMIOS_SetUCRegA&lt;/SPAN&gt;&lt;SPAN style="color: #d4d4d4;"&gt;(emiosGroup, restChannel, opwfmParam-&amp;gt;&lt;/SPAN&gt;&lt;SPAN style="color: #9cdcfe;"&gt;dutyCycleCount&lt;/SPAN&gt;&lt;SPAN style="color: #d4d4d4;"&gt;);&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN style="color: #d4d4d4;"&gt; }&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN style="color: #d4d4d4;"&gt; &lt;/SPAN&gt;&lt;SPAN style="color: #c586c0;"&gt;else&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN style="color: #d4d4d4;"&gt; {&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN style="color: #d4d4d4;"&gt; &lt;/SPAN&gt;&lt;SPAN style="color: #dcdcaa;"&gt;EMIOS_SetUCRegA&lt;/SPAN&gt;&lt;SPAN style="color: #d4d4d4;"&gt;(emiosGroup, restChannel, opwfmParam-&amp;gt;&lt;/SPAN&gt;&lt;SPAN style="color: #9cdcfe;"&gt;periodCount&lt;/SPAN&gt;&lt;SPAN style="color: #d4d4d4;"&gt; &lt;/SPAN&gt;&lt;SPAN style="color: #d4d4d4;"&gt;-&lt;/SPAN&gt;&lt;SPAN style="color: #d4d4d4;"&gt; opwfmParam-&amp;gt;&lt;/SPAN&gt;&lt;SPAN style="color: #9cdcfe;"&gt;dutyCycleCount&lt;/SPAN&gt;&lt;SPAN style="color: #d4d4d4;"&gt;);&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN style="color: #d4d4d4;"&gt; }&lt;/SPAN&gt;&lt;/DIV&gt;&lt;BR /&gt;&lt;DIV&gt;&lt;SPAN style="color: #d4d4d4;"&gt; &lt;/SPAN&gt;&lt;SPAN style="color: #dcdcaa;"&gt;EMIOS_SetUCRegB&lt;/SPAN&gt;&lt;SPAN style="color: #d4d4d4;"&gt;(emiosGroup, restChannel, opwfmParam-&amp;gt;&lt;/SPAN&gt;&lt;SPAN style="color: #9cdcfe;"&gt;periodCount&lt;/SPAN&gt;&lt;SPAN style="color: #d4d4d4;"&gt;);&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN style="color: #d4d4d4;"&gt; &lt;/SPAN&gt;&lt;SPAN style="color: #dcdcaa;"&gt;EMIOS_SetUCRegCNT&lt;/SPAN&gt;&lt;SPAN style="color: #d4d4d4;"&gt;(emiosGroup, restChannel, &lt;/SPAN&gt;&lt;SPAN style="color: #b5cea8;"&gt;1U&lt;/SPAN&gt;&lt;SPAN style="color: #d4d4d4;"&gt;); &lt;/SPAN&gt;&lt;SPAN style="color: #6a9955;"&gt;&lt;SPAN&gt;/* See: &lt;/SPAN&gt;&lt;A class="jive-link-thread-small" data-containerid="11462" data-containertype="14" data-objectid="493286" data-objecttype="1" href="https://community.nxp.com/thread/493286"&gt;https://community.nxp.com/message/1101052&lt;/A&gt;&lt;SPAN&gt; */&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN style="color: #d4d4d4;"&gt; &lt;/SPAN&gt;&lt;SPAN style="color: #dcdcaa;"&gt;EMIOS_SetUCRegCEdpol&lt;/SPAN&gt;&lt;SPAN style="color: #d4d4d4;"&gt;(emiosGroup, restChannel, (&lt;/SPAN&gt;&lt;SPAN style="color: #4ec9b0;"&gt;uint32_t&lt;/SPAN&gt;&lt;SPAN style="color: #d4d4d4;"&gt;)opwfmParam-&amp;gt;&lt;/SPAN&gt;&lt;SPAN style="color: #9cdcfe;"&gt;outputActiveMode&lt;/SPAN&gt;&lt;SPAN style="color: #d4d4d4;"&gt;);&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN style="color: #d4d4d4;"&gt; &lt;/SPAN&gt;&lt;SPAN style="color: #dcdcaa;"&gt;EMIOS_SetUCRegCMode&lt;/SPAN&gt;&lt;SPAN style="color: #d4d4d4;"&gt;(emiosGroup, restChannel, (&lt;/SPAN&gt;&lt;SPAN style="color: #4ec9b0;"&gt;uint32_t&lt;/SPAN&gt;&lt;SPAN style="color: #d4d4d4;"&gt;)opwfmParam-&amp;gt;&lt;/SPAN&gt;&lt;SPAN style="color: #9cdcfe;"&gt;mode&lt;/SPAN&gt;&lt;SPAN style="color: #d4d4d4;"&gt;);&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN style="color: #d4d4d4;"&gt; &lt;/SPAN&gt;&lt;SPAN style="color: #dcdcaa;"&gt;EMIOS_SetUCRegCUcpren&lt;/SPAN&gt;&lt;SPAN style="color: #d4d4d4;"&gt;(emiosGroup, restChannel, opwfmParam-&amp;gt;&lt;/SPAN&gt;&lt;SPAN style="color: #9cdcfe;"&gt;internalPrescalerEn&lt;/SPAN&gt;&lt;SPAN style="color: #d4d4d4;"&gt; &lt;/SPAN&gt;&lt;SPAN style="color: #d4d4d4;"&gt;?&lt;/SPAN&gt;&lt;SPAN style="color: #d4d4d4;"&gt; &lt;/SPAN&gt;&lt;SPAN style="color: #b5cea8;"&gt;1UL&lt;/SPAN&gt;&lt;SPAN style="color: #d4d4d4;"&gt;:&lt;/SPAN&gt;&lt;SPAN style="color: #d4d4d4;"&gt; &lt;/SPAN&gt;&lt;SPAN style="color: #b5cea8;"&gt;0UL&lt;/SPAN&gt;&lt;SPAN style="color: #d4d4d4;"&gt;);&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN style="color: #c586c0;"&gt;#if&lt;/SPAN&gt;&lt;SPAN style="color: #569cd6;"&gt; &lt;/SPAN&gt;&lt;SPAN style="color: #c586c0;"&gt;defined&lt;/SPAN&gt;&lt;SPAN style="color: #569cd6;"&gt;(&lt;/SPAN&gt;&lt;SPAN style="color: #dcdcaa;"&gt;FEATURE_EMIOS_PRESCALER_SELECT_BITS&lt;/SPAN&gt;&lt;SPAN style="color: #569cd6;"&gt;)&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN style="color: #d4d4d4;"&gt; &lt;/SPAN&gt;&lt;SPAN style="color: #dcdcaa;"&gt;EMIOS_SetUCRegC2UCEXTPRE&lt;/SPAN&gt;&lt;SPAN style="color: #d4d4d4;"&gt;(emiosGroup, restChannel, (&lt;/SPAN&gt;&lt;SPAN style="color: #4ec9b0;"&gt;uint32_t&lt;/SPAN&gt;&lt;SPAN style="color: #d4d4d4;"&gt;)opwfmParam-&amp;gt;&lt;/SPAN&gt;&lt;SPAN style="color: #9cdcfe;"&gt;internalPrescaler&lt;/SPAN&gt;&lt;SPAN style="color: #d4d4d4;"&gt;); &lt;/SPAN&gt;&lt;SPAN style="color: #6a9955;"&gt;/* Pre-scale channel clock by internalPrescaler +1 */&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN style="color: #d4d4d4;"&gt; &lt;/SPAN&gt;&lt;SPAN style="color: #dcdcaa;"&gt;EMIOS_SetUCRegC2UCPRECLK&lt;/SPAN&gt;&lt;SPAN style="color: #d4d4d4;"&gt;(emiosGroup, restChannel, &lt;/SPAN&gt;&lt;SPAN style="color: #b5cea8;"&gt;0UL&lt;/SPAN&gt;&lt;SPAN style="color: #d4d4d4;"&gt;); &lt;/SPAN&gt;&lt;SPAN style="color: #6a9955;"&gt;/* Prescaler clock selected*/&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN style="color: #c586c0;"&gt;#else&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN style="color: #d4d4d4;"&gt; &lt;/SPAN&gt;&lt;SPAN style="color: #dcdcaa;"&gt;EMIOS_SetUCRegCUcpre&lt;/SPAN&gt;&lt;SPAN style="color: #d4d4d4;"&gt;(emiosGroup, restChannel, (&lt;/SPAN&gt;&lt;SPAN style="color: #4ec9b0;"&gt;uint32_t&lt;/SPAN&gt;&lt;SPAN style="color: #d4d4d4;"&gt;)opwfmParam-&amp;gt;&lt;/SPAN&gt;&lt;SPAN style="color: #9cdcfe;"&gt;internalPrescaler&lt;/SPAN&gt;&lt;SPAN style="color: #d4d4d4;"&gt;); &lt;/SPAN&gt;&lt;SPAN style="color: #6a9955;"&gt;/* Pre-scale channel clock by internalPrescaler +1 */&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN style="color: #c586c0;"&gt;#endif&lt;/SPAN&gt;&lt;/DIV&gt;&lt;BR /&gt;&lt;DIV&gt;&lt;SPAN style="color: #d4d4d4;"&gt; &lt;/SPAN&gt;&lt;SPAN style="color: #c586c0;"&gt;return&lt;/SPAN&gt;&lt;SPAN style="color: #d4d4d4;"&gt; STATUS_SUCCESS;&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN style="color: #d4d4d4;"&gt;}&lt;/SPAN&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 15 Jan 2019 18:02:55 GMT</pubDate>
      <guid>https://community.nxp.com/t5/S32-Design-Studio/eMIOS-OPWFMB-mode-initialization-using-S32DS-SDK/m-p/874441#M4526</guid>
      <dc:creator>dan_teodorescu</dc:creator>
      <dc:date>2019-01-15T18:02:55Z</dc:date>
    </item>
    <item>
      <title>Re: eMIOS OPWFMB mode initialization using S32DS SDK</title>
      <link>https://community.nxp.com/t5/S32-Design-Studio/eMIOS-OPWFMB-mode-initialization-using-S32DS-SDK/m-p/874442#M4527</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi &lt;A class="jx-jive-macro-user" href="https://community.nxp.com/people/dan.teodorescu"&gt;dan.teodorescu&lt;/A&gt;‌,&lt;/P&gt;&lt;P&gt;Your opinion is very good, but add the function&amp;nbsp;&lt;SPAN style="color: #dcdcaa; background-color: #1e1e1e;"&gt;EMIOS_SetUCRegCNT&lt;/SPAN&gt;&amp;nbsp;is not necessary because internal counter is cleared when entering GPIO mode. In the function&amp;nbsp;&lt;SPAN style="color: #dcdcaa; background-color: #1e1e1e;"&gt;EMIOS_DRV_PWM_InitPeriodDutyCycleMode&lt;/SPAN&gt;&amp;nbsp;will clear UC register before configures and entering&amp;nbsp;&lt;SPAN style="color: #51626f; background-color: #ffffff;"&gt;OPWFMB&lt;/SPAN&gt;&amp;nbsp;mode by this line of code&amp;nbsp;&lt;SPAN style="color: #d4d4d4; background-color: #1e1e1e; border: 0px; font-size: 14px;"&gt;eMIOS[emiosGroup]-&amp;gt;&lt;/SPAN&gt;&lt;SPAN style="color: #9cdcfe; background-color: #1e1e1e; border: 0px; font-size: 14px;"&gt;UC&lt;/SPAN&gt;&lt;SPAN style="color: #d4d4d4; background-color: #1e1e1e; border: 0px; font-size: 14px;"&gt;[restChannel].&lt;/SPAN&gt;&lt;SPAN style="color: #9cdcfe; background-color: #1e1e1e; border: 0px; font-size: 14px;"&gt;C&lt;/SPAN&gt;&lt;SPAN style="color: #d4d4d4; background-color: #1e1e1e; border: 0px; font-size: 14px;"&gt; &lt;/SPAN&gt;&lt;SPAN style="color: #d4d4d4; background-color: #1e1e1e; border: 0px; font-size: 14px;"&gt;=&lt;/SPAN&gt;&lt;SPAN style="color: #d4d4d4; background-color: #1e1e1e; border: 0px; font-size: 14px;"&gt; &lt;/SPAN&gt;&lt;SPAN style="color: #b5cea8; background-color: #1e1e1e; border: 0px; font-size: 14px;"&gt;0UL&lt;/SPAN&gt;&lt;SPAN style="color: #d4d4d4; background-color: #1e1e1e; border: 0px; font-size: 14px;"&gt;; &lt;/SPAN&gt;&lt;SPAN style="color: #6a9955; background-color: #1e1e1e; border: 0px; font-size: 14px;"&gt;/* Disable channel pre-scaler (reset default) */&lt;/SPAN&gt;. That mean it will entering GPIO mode and UC CNT will be cleared before configures and entering OPWFMB mode.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thank you.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 16 Jan 2019 10:52:09 GMT</pubDate>
      <guid>https://community.nxp.com/t5/S32-Design-Studio/eMIOS-OPWFMB-mode-initialization-using-S32DS-SDK/m-p/874442#M4527</guid>
      <dc:creator>truongtranvan</dc:creator>
      <dc:date>2019-01-16T10:52:09Z</dc:date>
    </item>
    <item>
      <title>Re: eMIOS OPWFMB mode initialization using S32DS SDK</title>
      <link>https://community.nxp.com/t5/S32-Design-Studio/eMIOS-OPWFMB-mode-initialization-using-S32DS-SDK/m-p/874443#M4528</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi &lt;A class="jx-jive-macro-user" href="https://community.nxp.com/people/truongtranvan"&gt;truongtranvan&lt;/A&gt;‌,&lt;/P&gt;&lt;P&gt;You are correct. According to MPC5777CRM section 36.6.1.1.1 (page 1422), "&lt;EM&gt;In GPIO mode, all input capture and output compare functions of the Unified Channel are disabled, and the internal counter (EMIOSCNTn register) is cleared and disabled.&lt;/EM&gt;" I will remove the line I added in my copy of the driver.&lt;/P&gt;&lt;P&gt;Thank you, Dan&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 16 Jan 2019 18:12:17 GMT</pubDate>
      <guid>https://community.nxp.com/t5/S32-Design-Studio/eMIOS-OPWFMB-mode-initialization-using-S32DS-SDK/m-p/874443#M4528</guid>
      <dc:creator>dan_teodorescu</dc:creator>
      <dc:date>2019-01-16T18:12:17Z</dc:date>
    </item>
    <item>
      <title>Re: eMIOS OPWFMB mode initialization using S32DS SDK</title>
      <link>https://community.nxp.com/t5/S32-Design-Studio/eMIOS-OPWFMB-mode-initialization-using-S32DS-SDK/m-p/874444#M4529</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi &lt;A class="jx-jive-macro-user" href="https://community.nxp.com/people/truongtranvan"&gt;truongtranvan&lt;/A&gt;‌,&lt;/P&gt;&lt;P&gt;I apologize for not noticing earlier that there is a discrepancy between how the GPIO mode clears the count register and what is a valid value for the register in OPWFMB mode. The register is cleared in GPIO mode, but the OPWFMB mode requires that it be initialized to a value between 1 and the value of the B1 register. Having GPIO mode initialize it to 0 does not meet this requirement. In this case I believe that an explicit CNT register initialization is necessary.&lt;/P&gt;&lt;P&gt;Thank you,&lt;/P&gt;&lt;P&gt;Dan&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 11 Feb 2019 18:42:20 GMT</pubDate>
      <guid>https://community.nxp.com/t5/S32-Design-Studio/eMIOS-OPWFMB-mode-initialization-using-S32DS-SDK/m-p/874444#M4529</guid>
      <dc:creator>dan_teodorescu</dc:creator>
      <dc:date>2019-02-11T18:42:20Z</dc:date>
    </item>
  </channel>
</rss>

