<?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: PWM Signal measurement using ICU-eMIOS channel returning Zero values for both Period &amp;amp; Duty in S32K</title>
    <link>https://community.nxp.com/t5/S32K/PWM-Signal-measurement-using-ICU-eMIOS-channel-returning-Zero/m-p/1636863#M22256</link>
    <description>&lt;P&gt;Hi, Can you debug and check that whether &lt;SPAN&gt;"&lt;/SPAN&gt;&lt;STRONG&gt;EMIOS1_3_IRQ&lt;/STRONG&gt;&lt;SPAN&gt;" is triggered when start Pwm channel?&lt;BR /&gt;As your description, I think that Icu period hasn't updated because Interrupt hasn't entered.&lt;BR /&gt;Furthermore, please give me configuration of Interrupt in Platform and Pin configuration also.&lt;BR /&gt;And snapshot the code in your application when you Init Platform and&amp;nbsp;enabled "&lt;STRONG&gt;EMIOS1_3_IRQ&lt;/STRONG&gt;"&lt;BR /&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;</description>
    <pubDate>Thu, 20 Apr 2023 03:25:31 GMT</pubDate>
    <dc:creator>cuongnguyenphu</dc:creator>
    <dc:date>2023-04-20T03:25:31Z</dc:date>
    <item>
      <title>PWM Signal measurement using ICU-eMIOS channel returning Zero values for both Period &amp; Duty Cycle</title>
      <link>https://community.nxp.com/t5/S32K/PWM-Signal-measurement-using-ICU-eMIOS-channel-returning-Zero/m-p/1630568#M21950</link>
      <description>&lt;P&gt;Hello Everyone,&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;I was trying to build a project for measuring the Duty cycle and Period of a PWM signal.&amp;nbsp;&lt;/P&gt;&lt;P&gt;The PWM signal is generated using the MCAL-PWM module by configuring one EMIOS instance under the same. The Port PIN for PWM output is fed into one ICU-EMIOS channel using jumper connection.&lt;/P&gt;&lt;P&gt;Below are the configurations made:&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&lt;U&gt;PWM-eMIOS as output channel :&lt;/U&gt;&lt;/STRONG&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;PWM Channel &lt;STRONG&gt;0&lt;/STRONG&gt; ;&amp;nbsp; &amp;nbsp;H/W instance: &lt;STRONG&gt;0&lt;/STRONG&gt; ;&amp;nbsp; &amp;nbsp;Channel ID:&lt;STRONG&gt; 1&lt;/STRONG&gt; ;&amp;nbsp; &amp;nbsp;Mode: &lt;STRONG&gt;OPWFMB , &lt;/STRONG&gt;as shown below :&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Jishnu_Bhavadas_0-1681134331214.png" style="width: 400px;"&gt;&lt;img src="https://community.nxp.com/t5/image/serverpage/image-id/218544i70AE1B3D07ABEE71/image-size/medium?v=v2&amp;amp;px=400" role="button" title="Jishnu_Bhavadas_0-1681134331214.png" alt="Jishnu_Bhavadas_0-1681134331214.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Jishnu_Bhavadas_1-1681134382114.png" style="width: 400px;"&gt;&lt;img src="https://community.nxp.com/t5/image/serverpage/image-id/218545i14527622B96ECA32/image-size/medium?v=v2&amp;amp;px=400" role="button" title="Jishnu_Bhavadas_1-1681134382114.png" alt="Jishnu_Bhavadas_1-1681134382114.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&lt;U&gt;ICU-eMIOS as input channel configuration :&lt;/U&gt;&lt;/STRONG&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;ICU Channel &lt;STRONG&gt;0&lt;/STRONG&gt; ;&amp;nbsp; &amp;nbsp;H/W instance: 1 ;&amp;nbsp; &amp;nbsp;Channel ID:&lt;STRONG&gt; 10&lt;/STRONG&gt; ;&amp;nbsp; &amp;nbsp;Mode: &lt;STRONG&gt;IPWM, &lt;/STRONG&gt;as shown below :&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Jishnu_Bhavadas_2-1681134574669.png" style="width: 400px;"&gt;&lt;img src="https://community.nxp.com/t5/image/serverpage/image-id/218546i711E70E1C3F8322E/image-size/medium?v=v2&amp;amp;px=400" role="button" title="Jishnu_Bhavadas_2-1681134574669.png" alt="Jishnu_Bhavadas_2-1681134574669.png" /&gt;&lt;/span&gt;&amp;nbsp; &amp;nbsp;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Jishnu_Bhavadas_3-1681134604585.png" style="width: 400px;"&gt;&lt;img src="https://community.nxp.com/t5/image/serverpage/image-id/218547i468C2727ED395E12/image-size/medium?v=v2&amp;amp;px=400" role="button" title="Jishnu_Bhavadas_3-1681134604585.png" alt="Jishnu_Bhavadas_3-1681134604585.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;After all the required Init() function calls, I am using below steps for setting the Duty cycle in PWM output channel and then read from ICU input channel :&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Jishnu_Bhavadas_4-1681134730162.png" style="width: 400px;"&gt;&lt;img src="https://community.nxp.com/t5/image/serverpage/image-id/218548iC37127CA1DF985F1/image-size/medium?v=v2&amp;amp;px=400" role="button" title="Jishnu_Bhavadas_4-1681134730162.png" alt="Jishnu_Bhavadas_4-1681134730162.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;I have enabled the interrupt handler in ICU module configuration and also enabled "&lt;STRONG&gt;EMIOS1_3_IRQ&lt;/STRONG&gt;"(as the input channel is EMIOS1_CH10) in Platform module as well.&lt;/P&gt;&lt;P&gt;But I'm getting Zero values for both Period &amp;amp; Duty Cycle from the Icu_GetDutyCycleValues function.&amp;nbsp;&lt;/P&gt;&lt;P&gt;While debugging I could see the execution going to the below highlighted step for updating the values as Zero:&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Jishnu_Bhavadas_5-1681135163693.png" style="width: 400px;"&gt;&lt;img src="https://community.nxp.com/t5/image/serverpage/image-id/218549iBBBC242374FC0617/image-size/medium?v=v2&amp;amp;px=400" role="button" title="Jishnu_Bhavadas_5-1681135163693.png" alt="Jishnu_Bhavadas_5-1681135163693.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I couldnt figure out what went wrong or any missing configurations.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Kindly help me to resolve this issue by your valuable suggestions.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks &amp;amp; Regards,&lt;/P&gt;&lt;P&gt;Jishnu&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 10 Apr 2023 13:59:29 GMT</pubDate>
      <guid>https://community.nxp.com/t5/S32K/PWM-Signal-measurement-using-ICU-eMIOS-channel-returning-Zero/m-p/1630568#M21950</guid>
      <dc:creator>Jishnu_Bhavadas</dc:creator>
      <dc:date>2023-04-10T13:59:29Z</dc:date>
    </item>
    <item>
      <title>Re: PWM Signal measurement using ICU-eMIOS channel returning Zero values for both Period &amp; Duty</title>
      <link>https://community.nxp.com/t5/S32K/PWM-Signal-measurement-using-ICU-eMIOS-channel-returning-Zero/m-p/1636863#M22256</link>
      <description>&lt;P&gt;Hi, Can you debug and check that whether &lt;SPAN&gt;"&lt;/SPAN&gt;&lt;STRONG&gt;EMIOS1_3_IRQ&lt;/STRONG&gt;&lt;SPAN&gt;" is triggered when start Pwm channel?&lt;BR /&gt;As your description, I think that Icu period hasn't updated because Interrupt hasn't entered.&lt;BR /&gt;Furthermore, please give me configuration of Interrupt in Platform and Pin configuration also.&lt;BR /&gt;And snapshot the code in your application when you Init Platform and&amp;nbsp;enabled "&lt;STRONG&gt;EMIOS1_3_IRQ&lt;/STRONG&gt;"&lt;BR /&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Thu, 20 Apr 2023 03:25:31 GMT</pubDate>
      <guid>https://community.nxp.com/t5/S32K/PWM-Signal-measurement-using-ICU-eMIOS-channel-returning-Zero/m-p/1636863#M22256</guid>
      <dc:creator>cuongnguyenphu</dc:creator>
      <dc:date>2023-04-20T03:25:31Z</dc:date>
    </item>
    <item>
      <title>Re: PWM Signal measurement using ICU-eMIOS channel returning Zero values for both Period &amp; Duty</title>
      <link>https://community.nxp.com/t5/S32K/PWM-Signal-measurement-using-ICU-eMIOS-channel-returning-Zero/m-p/1637089#M22270</link>
      <description>&lt;P&gt;Hi,&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;Actually I was trying with different input-output pins and below is the one I am currently using for PWM signal calculation:&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;&lt;P&gt;&lt;U&gt;PWM Output : OPWFMB Mode,&amp;nbsp;&lt;/U&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;EMIOS_0_CH_3&amp;nbsp; = MSCR 130 = GPIO 130 = PTE2&amp;nbsp;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;U&gt;PWM Input&amp;nbsp; &amp;nbsp;:&amp;nbsp; ICU - IPWM Mode&lt;/U&gt;&lt;/P&gt;&lt;P&gt;EMIOS_1_CH_1&amp;nbsp; = MSCR 19&amp;nbsp; = GPIO 19&amp;nbsp; = PTA19&amp;nbsp;&lt;/P&gt;&lt;P&gt;As it is EMIOS1_CH1, I have enabled the interrupt&amp;nbsp;&lt;SPAN&gt;"&lt;/SPAN&gt;&lt;STRONG&gt;EMIOS1_5_IRQ&lt;/STRONG&gt;&lt;SPAN&gt;" and this interrupt is being triggered as well. In the Design Studio project, I am able to see the capture values in Register A &amp;amp; B and accordingly the "Emios_Icu_Ip_IrqHandler()" is able to calculate some signal values (Values are getting changed when reading in a loop though) and I am able to read it using&amp;nbsp;"Icu_GetDutyCycleValues" api.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;Current observation is that :&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;1) in the second read, it is able to provide both period and duty cycle values (which is same whenever I execute, but able to see a multiplication factor of 2 with what I set in PWM output channel)&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;2) If I again read the value using&amp;nbsp;Icu_GetDutyCycleValues api, the values are getting changed often.&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;Could you please provide clarity on why the signal calculation values are getting changed when I am reading it again. ?&amp;nbsp;&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;I tried to bring the same configuration into my baseline project using EB Tresos configuration. Made the same changes as in Design Studio, but then I am not able to see the interrupt trigger and the register A &amp;amp; B are also not showing up any values.&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;Could you please suggest me what could be the reason for the Reg A &amp;amp; Reg B capture events are not happening in my integrated project when the same configuration is working with Design Studio project ?&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;Screenshot showing the register values for the Design studio project :&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Jishnu_Bhavadas_0-1681980338588.png" style="width: 400px;"&gt;&lt;img src="https://community.nxp.com/t5/image/serverpage/image-id/220022i1AB4312E74314BFC/image-size/medium?v=v2&amp;amp;px=400" role="button" title="Jishnu_Bhavadas_0-1681980338588.png" alt="Jishnu_Bhavadas_0-1681980338588.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;Screenshot showing the register values for my integrated project created with EB configuration&amp;nbsp;:&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Jishnu_Bhavadas_1-1681980460411.png" style="width: 442px;"&gt;&lt;img src="https://community.nxp.com/t5/image/serverpage/image-id/220023i912031B5B3B1443D/image-dimensions/442x116?v=v2" width="442" height="116" role="button" title="Jishnu_Bhavadas_1-1681980460411.png" alt="Jishnu_Bhavadas_1-1681980460411.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;. Apart from this, I have below queries as well :&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;1) Is it possible to calculate PWM signal values in ICU-Signal measurement mode with Interrupt disabled ( ie, by disabling corresponding interrupt-&lt;STRONG&gt;EMIOS1_5_IRQn&lt;/STRONG&gt; in &lt;STRONG&gt;Platform&lt;/STRONG&gt;, disabling the channel ISR-&lt;STRONG&gt;EMIOS1_CH1&lt;/STRONG&gt; in ICU configuration &amp;amp; enabling the flag "&lt;STRONG&gt;IcuSignalMeasureWithoutInterrupt&lt;/STRONG&gt;".?&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;2) When interrupts are disabled, will it still capture values in A &amp;amp; B register properly ? - I tried this in Design Studio project, but I could see the values were not as proper as the case when interrupt enabled. Its giving same values for A &amp;amp; B register in the first read.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;3) In the PWM module, how can we calculate the resultant PWM-output signal frequency ?. S&lt;/SPAN&gt;&lt;SPAN&gt;aw the below formula from one of the query raised in community,&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;PWM frequency = CORE_CLK / global pre-scaler / internal pre-scaler / (B1+1)&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;"&lt;EM&gt;B1 is a value written to channel B register."&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;But as per this calculation, I was not getting the output frequency and is mismatching with the actual generated signal (verified its frequency through oscilloscope).&lt;/P&gt;&lt;P&gt;Below are the values that I set in PWM module:&lt;/P&gt;&lt;P&gt;CORE_CLK = 240MHz | OPWFMB Mode&amp;nbsp; |&amp;nbsp;&lt;/P&gt;&lt;P&gt;Global Pre-scaler : 44 (Clock Divider value set in MCL module - EMIOS0_CH23 )&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Jishnu_Bhavadas_2-1681981839262.png" style="width: 400px;"&gt;&lt;img src="https://community.nxp.com/t5/image/serverpage/image-id/220026i4C40462FA1E02254/image-size/medium?v=v2&amp;amp;px=400" role="button" title="Jishnu_Bhavadas_2-1681981839262.png" alt="Jishnu_Bhavadas_2-1681981839262.png" /&gt;&lt;/span&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Jishnu_Bhavadas_3-1681981934140.png" style="width: 400px;"&gt;&lt;img src="https://community.nxp.com/t5/image/serverpage/image-id/220027iB09458F671CB36DB/image-size/medium?v=v2&amp;amp;px=400" role="button" title="Jishnu_Bhavadas_3-1681981934140.png" alt="Jishnu_Bhavadas_3-1681981934140.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Jishnu_Bhavadas_4-1681982074529.png" style="width: 400px;"&gt;&lt;img src="https://community.nxp.com/t5/image/serverpage/image-id/220028iF8AD6BE640EBB892/image-size/medium?v=v2&amp;amp;px=400" role="button" title="Jishnu_Bhavadas_4-1681982074529.png" alt="Jishnu_Bhavadas_4-1681982074529.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;As per the formula , we got &lt;STRONG&gt;340Hz&lt;/STRONG&gt; ( 240MHz/ (44*2*(8000+1)), but what I got from the oscilloscope was having &lt;STRONG&gt;3.67kHz&lt;/STRONG&gt;.for 50% duty cycle. (Reg-A value : 4000&amp;nbsp; &amp;amp;&amp;nbsp; Reg-B value : 8000).&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Kindly help me to understand the above mentioned issues and provide resolutions accordingly.&lt;/P&gt;&lt;P&gt;Thanks in advance for your response.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks &amp;amp; Regards&lt;/P&gt;&lt;P&gt;Jishnu T B&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 20 Apr 2023 09:27:21 GMT</pubDate>
      <guid>https://community.nxp.com/t5/S32K/PWM-Signal-measurement-using-ICU-eMIOS-channel-returning-Zero/m-p/1637089#M22270</guid>
      <dc:creator>Jishnu_Bhavadas</dc:creator>
      <dc:date>2023-04-20T09:27:21Z</dc:date>
    </item>
    <item>
      <title>Re: PWM Signal measurement using ICU-eMIOS channel returning Zero values for both Period &amp; Duty</title>
      <link>https://community.nxp.com/t5/S32K/PWM-Signal-measurement-using-ICU-eMIOS-channel-returning-Zero/m-p/1826510#M32860</link>
      <description>&lt;P&gt;Having similar issues regarding reading PWM ICU from a PWM output and also wondering if I can de-select the IcuSignalMeasureWithoutInterrupt button and still get a measurement. Any follow up from NXP would be greatly appreciated.&lt;/P&gt;</description>
      <pubDate>Tue, 12 Mar 2024 18:40:59 GMT</pubDate>
      <guid>https://community.nxp.com/t5/S32K/PWM-Signal-measurement-using-ICU-eMIOS-channel-returning-Zero/m-p/1826510#M32860</guid>
      <dc:creator>KGStafl</dc:creator>
      <dc:date>2024-03-12T18:40:59Z</dc:date>
    </item>
    <item>
      <title>Re: PWM Signal measurement using ICU-eMIOS channel returning Zero values for both Period &amp; Duty</title>
      <link>https://community.nxp.com/t5/S32K/PWM-Signal-measurement-using-ICU-eMIOS-channel-returning-Zero/m-p/1863969#M35249</link>
      <description>Having similar issues，I would like to know how you solved this problem。Any follow up from you would be greatly appreciated</description>
      <pubDate>Mon, 13 May 2024 02:58:05 GMT</pubDate>
      <guid>https://community.nxp.com/t5/S32K/PWM-Signal-measurement-using-ICU-eMIOS-channel-returning-Zero/m-p/1863969#M35249</guid>
      <dc:creator>hope_zhou</dc:creator>
      <dc:date>2024-05-13T02:58:05Z</dc:date>
    </item>
    <item>
      <title>回复： PWM Signal measurement using ICU-eMIOS channel returning Zero values for both Period &amp; Duty</title>
      <link>https://community.nxp.com/t5/S32K/PWM-Signal-measurement-using-ICU-eMIOS-channel-returning-Zero/m-p/1886634#M36536</link>
      <description>&lt;P&gt;I had a similar problem, the function can jump but the value is still 0, how did you solve it&lt;/P&gt;</description>
      <pubDate>Thu, 13 Jun 2024 06:40:10 GMT</pubDate>
      <guid>https://community.nxp.com/t5/S32K/PWM-Signal-measurement-using-ICU-eMIOS-channel-returning-Zero/m-p/1886634#M36536</guid>
      <dc:creator>hangli1</dc:creator>
      <dc:date>2024-06-13T06:40:10Z</dc:date>
    </item>
  </channel>
</rss>

