<?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>S32KのトピックRe: s32k312 - Measure the pwm pulse using eMIOS</title>
    <link>https://community.nxp.com/t5/S32K/s32k312-Measure-the-pwm-pulse-using-eMIOS/m-p/2088211#M48228</link>
    <description>&lt;P&gt;I am currently working with the eMIOS module and encountered some configuration questions. Could you kindly assist in clarifying the following points?&lt;/P&gt;&lt;P&gt;1. Clock Divider Value and Its Impact on ICU&lt;BR /&gt;In the provided sample code, the Clock Divider Value under EmiosCommon_0 is set to 200.&lt;BR /&gt;Could you please advise how the Clock Divider Value should be considered when configuring the ICU (Input Capture Unit)?&lt;BR /&gt;Specifically, how does it impact the measurement accuracy or behavior?&lt;/P&gt;&lt;P&gt;2. Channel Consistency Between ICU Measurement and PWM Signal&lt;BR /&gt;When using ICU_MODE_SIGNAL_MEASUREMENT (e.g., emios_0_ch_1_g) in IPWM mode for signal measurement,&lt;BR /&gt;is it necessary for the eMIOS channel to be the same as the PWM signal's channel (e.g., emios_1_ch_0_x)?&lt;BR /&gt;Or can the measurement channel be different from the PWM signal source channel?&lt;/P&gt;&lt;P&gt;My current RTD configuration is as follows:&lt;/P&gt;&lt;P&gt;PTA12 → eMIOS Channel 8&lt;/P&gt;&lt;P&gt;PTC11 → eMIOS Channel 0&lt;/P&gt;&lt;P&gt;3. Configuration Limitation in Emios_Icu&lt;BR /&gt;While configuring the Emios_Icu module in IcueMios, I noticed that only the "EMIOS_ICU_BUS_DIVERSE" option is available.&lt;BR /&gt;Could you please help identify the possible reasons for this limitation, and how to configure it to support other bus types if needed?&lt;/P&gt;&lt;P&gt;4. Measurement Accuracy with Varying PWM Signals&lt;BR /&gt;If the PWM signal has a period of 1Hz (1-second period) and a duty cycle of 5%,&lt;BR /&gt;would using ICU_MODE_SIGNAL_MEASUREMENT mode (e.g., emios_0_ch_1_g) still allow accurate capture of the signal's active time and period,&lt;BR /&gt;especially when the PWM frequency varies between 1Hz to 5Hz or the duty cycle varies from 0% to 100%?&lt;/P&gt;</description>
    <pubDate>Mon, 28 Apr 2025 09:01:57 GMT</pubDate>
    <dc:creator>CCY_Yu</dc:creator>
    <dc:date>2025-04-28T09:01:57Z</dc:date>
    <item>
      <title>s32k312 - Measure the pwm pulse using eMIOS</title>
      <link>https://community.nxp.com/t5/S32K/s32k312-Measure-the-pwm-pulse-using-eMIOS/m-p/2086167#M48087</link>
      <description>&lt;P&gt;S32K312 with non-AutoSAR project&lt;/P&gt;&lt;P&gt;The current configuration is using PTC11 (EIRQ_19)to detect the edge.&lt;/P&gt;&lt;P&gt;And now we want to using PTA12 to generated the pwm pulse and using PTC11 to measure the duty cycle and period from PTA12.&amp;nbsp;&lt;/P&gt;&lt;P&gt;The previous configuration could generated the pwm pulse, however, after added the Emios_lcu module with call the API (Emios_Icu_Ip_Init(INSTANCE_1, &amp;amp;eMios_Icu_Ip_1_Config_PB_BOARD_INITPERIPHERALS);&lt;BR /&gt;, pwm pulse was disappeared.&lt;/P&gt;&lt;P&gt;1.The PTC11 was configured within SIUL2 LCU module, should i remove the configuration if we want to use Emios_lcu?&lt;BR /&gt;remove the channel configuration and HW interrupt list&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="CCY_Yu_2-1745464386813.png" style="width: 400px;"&gt;&lt;img src="https://community.nxp.com/t5/image/serverpage/image-id/334593i7C7E69A8785B51F1/image-size/medium?v=v2&amp;amp;px=400" role="button" title="CCY_Yu_2-1745464386813.png" alt="CCY_Yu_2-1745464386813.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="CCY_Yu_1-1745464303089.png" style="width: 400px;"&gt;&lt;img src="https://community.nxp.com/t5/image/serverpage/image-id/334592i6FEB3C0DA2808B78/image-size/medium?v=v2&amp;amp;px=400" role="button" title="CCY_Yu_1-1745464303089.png" alt="CCY_Yu_1-1745464303089.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;2.Can you help to check if my configuration is correct or not?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="CCY_Yu_3-1745464457222.png" style="width: 400px;"&gt;&lt;img src="https://community.nxp.com/t5/image/serverpage/image-id/334594i0956EF8E4175D8CE/image-size/medium?v=v2&amp;amp;px=400" role="button" title="CCY_Yu_3-1745464457222.png" alt="CCY_Yu_3-1745464457222.png" /&gt;&lt;/span&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="CCY_Yu_4-1745464476309.png" style="width: 400px;"&gt;&lt;img src="https://community.nxp.com/t5/image/serverpage/image-id/334595iFB6E08C654C0830C/image-size/medium?v=v2&amp;amp;px=400" role="button" title="CCY_Yu_4-1745464476309.png" alt="CCY_Yu_4-1745464476309.png" /&gt;&lt;/span&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="CCY_Yu_5-1745464497747.png" style="width: 400px;"&gt;&lt;img src="https://community.nxp.com/t5/image/serverpage/image-id/334596i798C01B6ED50E42D/image-size/medium?v=v2&amp;amp;px=400" role="button" title="CCY_Yu_5-1745464497747.png" alt="CCY_Yu_5-1745464497747.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;Remarks:&lt;/P&gt;&lt;P&gt;OPWM&lt;BR /&gt;PTA12/GPIO[12]/EMIOS_0_CH[14]_H&lt;/P&gt;&lt;P&gt;IPWM/SAIC&lt;BR /&gt;PTC11/GPIO[75]/EMIOS_1_CH[1]_H/EIRQ[19]&lt;/P&gt;</description>
      <pubDate>Thu, 24 Apr 2025 03:17:04 GMT</pubDate>
      <guid>https://community.nxp.com/t5/S32K/s32k312-Measure-the-pwm-pulse-using-eMIOS/m-p/2086167#M48087</guid>
      <dc:creator>CCY_Yu</dc:creator>
      <dc:date>2025-04-24T03:17:04Z</dc:date>
    </item>
    <item>
      <title>Re: s32k312 - Measure the pwm pulse using eMIOS</title>
      <link>https://community.nxp.com/t5/S32K/s32k312-Measure-the-pwm-pulse-using-eMIOS/m-p/2087461#M48179</link>
      <description>&lt;P&gt;Thanks for contacting our technical support.&lt;/P&gt;
&lt;P&gt;Yes! If you want to configure PTC11 as eMIOS, you should delete configuration EIRQ_19.&lt;/P&gt;
&lt;P&gt;For period and duty cycle measurement please refer to attached project.&lt;/P&gt;
&lt;P&gt;Such project perform IPWM mode using &lt;EM&gt;ICU_MODE_SIGNAL_MEASUREMENT&lt;/EM&gt; (&lt;EM&gt;emios_0_ch_1_g&lt;/EM&gt;) to get active time and period from a generated PWM signal (&lt;EM&gt;emios_1_ch_0_x&lt;/EM&gt;).&lt;/P&gt;
&lt;P&gt;Please use S32DS 3.6 and RTD 5.0.0 with S32K31XEVB-Q100 (and connect PWM to ICU pins). If you need different S32K3 derivative and/or RTD version, you can create a new project, do manual config and code copy.&lt;/P&gt;
&lt;P&gt;Hope it helps you.&lt;/P&gt;
&lt;P&gt;Have a nice day!&lt;/P&gt;</description>
      <pubDate>Fri, 25 Apr 2025 18:54:16 GMT</pubDate>
      <guid>https://community.nxp.com/t5/S32K/s32k312-Measure-the-pwm-pulse-using-eMIOS/m-p/2087461#M48179</guid>
      <dc:creator>_Leo_</dc:creator>
      <dc:date>2025-04-25T18:54:16Z</dc:date>
    </item>
    <item>
      <title>Re: s32k312 - Measure the pwm pulse using eMIOS</title>
      <link>https://community.nxp.com/t5/S32K/s32k312-Measure-the-pwm-pulse-using-eMIOS/m-p/2088211#M48228</link>
      <description>&lt;P&gt;I am currently working with the eMIOS module and encountered some configuration questions. Could you kindly assist in clarifying the following points?&lt;/P&gt;&lt;P&gt;1. Clock Divider Value and Its Impact on ICU&lt;BR /&gt;In the provided sample code, the Clock Divider Value under EmiosCommon_0 is set to 200.&lt;BR /&gt;Could you please advise how the Clock Divider Value should be considered when configuring the ICU (Input Capture Unit)?&lt;BR /&gt;Specifically, how does it impact the measurement accuracy or behavior?&lt;/P&gt;&lt;P&gt;2. Channel Consistency Between ICU Measurement and PWM Signal&lt;BR /&gt;When using ICU_MODE_SIGNAL_MEASUREMENT (e.g., emios_0_ch_1_g) in IPWM mode for signal measurement,&lt;BR /&gt;is it necessary for the eMIOS channel to be the same as the PWM signal's channel (e.g., emios_1_ch_0_x)?&lt;BR /&gt;Or can the measurement channel be different from the PWM signal source channel?&lt;/P&gt;&lt;P&gt;My current RTD configuration is as follows:&lt;/P&gt;&lt;P&gt;PTA12 → eMIOS Channel 8&lt;/P&gt;&lt;P&gt;PTC11 → eMIOS Channel 0&lt;/P&gt;&lt;P&gt;3. Configuration Limitation in Emios_Icu&lt;BR /&gt;While configuring the Emios_Icu module in IcueMios, I noticed that only the "EMIOS_ICU_BUS_DIVERSE" option is available.&lt;BR /&gt;Could you please help identify the possible reasons for this limitation, and how to configure it to support other bus types if needed?&lt;/P&gt;&lt;P&gt;4. Measurement Accuracy with Varying PWM Signals&lt;BR /&gt;If the PWM signal has a period of 1Hz (1-second period) and a duty cycle of 5%,&lt;BR /&gt;would using ICU_MODE_SIGNAL_MEASUREMENT mode (e.g., emios_0_ch_1_g) still allow accurate capture of the signal's active time and period,&lt;BR /&gt;especially when the PWM frequency varies between 1Hz to 5Hz or the duty cycle varies from 0% to 100%?&lt;/P&gt;</description>
      <pubDate>Mon, 28 Apr 2025 09:01:57 GMT</pubDate>
      <guid>https://community.nxp.com/t5/S32K/s32k312-Measure-the-pwm-pulse-using-eMIOS/m-p/2088211#M48228</guid>
      <dc:creator>CCY_Yu</dc:creator>
      <dc:date>2025-04-28T09:01:57Z</dc:date>
    </item>
    <item>
      <title>Re: s32k312 - Measure the pwm pulse using eMIOS</title>
      <link>https://community.nxp.com/t5/S32K/s32k312-Measure-the-pwm-pulse-using-eMIOS/m-p/2088685#M48254</link>
      <description>&lt;P&gt;Hi again,&lt;/P&gt;
&lt;P&gt;Regarding your questions:&lt;/P&gt;
&lt;P&gt;&lt;STRONG&gt;1.&lt;/STRONG&gt; In the attached project goal is measure period of 10-600 Hz PWM signals.&lt;/P&gt;
&lt;P&gt;So, considering max ticks for eMIOS are 65,534 (16 bits)…&lt;/P&gt;
&lt;P&gt;For generate a PWM signal 8-600 Hz we will use a &lt;EM&gt;Global Prescaler&lt;/EM&gt; = 250:&lt;/P&gt;
&lt;P&gt;&lt;EM&gt;1s -&amp;gt; 120MHz/250 (480,000 ticks)&lt;/EM&gt;&lt;BR /&gt;&lt;EM&gt;8Hz = (1/8)s&lt;/EM&gt;&lt;BR /&gt;&lt;EM&gt;-&amp;gt; 480,000 *(1/600) = 60,000 ticks&lt;/EM&gt;&lt;/P&gt;
&lt;P&gt;&lt;EM&gt;10Hz -&amp;gt; 480,000 *(1/10) = 48,000 ticks&lt;/EM&gt;&lt;/P&gt;
&lt;P&gt;&lt;EM&gt;600Hz -&amp;gt; 480,000 *(1/600) = 800 ticks&lt;/EM&gt;&lt;/P&gt;
&lt;P&gt;For measure a PWM signal of 10-600 Hz with eMIOS clock frequency of 120MHz and using &lt;EM&gt;Global Prescaler = 200 (in Emios_Mcl_Ip driver):&lt;/EM&gt;&lt;/P&gt;
&lt;P&gt;&lt;EM&gt;1s -&amp;gt; 120MHz/200 (600,000 ticks)&lt;/EM&gt;&lt;BR /&gt;&lt;EM&gt;10Hz = (1/10)s&lt;/EM&gt;&lt;BR /&gt;&lt;EM&gt;-&amp;gt; 600,000 *(1/10) = 60,000 ticks&lt;/EM&gt;&lt;/P&gt;
&lt;P&gt;&lt;EM&gt;600Hz -&amp;gt; 600,000 *(1/600) = 1,000 ticks&lt;/EM&gt;&lt;/P&gt;
&lt;P&gt;Overflow (&lt;STRONG&gt;theoretically&lt;/STRONG&gt;) should happen at -&amp;gt; 600,000/65,534 = 9.1556 Hz, But due to hardware implementation, the &lt;EM&gt;Icu Overflow Notification&lt;/EM&gt; is out of sync with the event for ICU_MODE_SIGNAL_MEASUREMENT, ICU_MODE_TIMESTAMP and ICU_MODE_SIGNAL_EDGE_DETECT modes.&lt;/P&gt;
&lt;P&gt;&lt;STRONG&gt;2.&lt;/STRONG&gt; Please refer to &lt;EM&gt;Table 401. eMIOS channel types&lt;/EM&gt; of reference manual in order to see which modes support each channel.&lt;/P&gt;
&lt;P&gt;&lt;STRONG&gt;3.&lt;/STRONG&gt; Please refer to &lt;EM&gt;Figure 321. EMIOS channel types&lt;/EM&gt;, &lt;EM&gt;Figure 322. Block diagram&lt;/EM&gt; and/or &lt;EM&gt;Table 403. Counter buses, channels, and timebase sources&lt;/EM&gt; in order to see counter buses capabilities. &lt;EM&gt;EMIOS_ICU_BUS_DIVERSE&lt;/EM&gt; refers to buses &lt;EM&gt;B&lt;/EM&gt;, &lt;EM&gt;C&lt;/EM&gt;&amp;nbsp;or &lt;EM&gt;D&lt;/EM&gt;.&lt;/P&gt;
&lt;P&gt;&lt;STRONG&gt;4.&lt;/STRONG&gt; Depending of PWM frequency that you will measure, you should set the &lt;EM&gt;Global Prescaler&lt;/EM&gt; in order to take advantage of the entire counter. For example:&lt;/P&gt;
&lt;P&gt;If you need to measure 10Hz and setting &lt;EM&gt;Global Prescaler&lt;/EM&gt; = 200 (as attached example).&lt;/P&gt;
&lt;P&gt;&lt;EM&gt;1s -&amp;gt; 120MHz/200 (600,000 ticks)&lt;/EM&gt;&lt;BR /&gt;&lt;EM&gt;10Hz = (1/10)s&lt;/EM&gt;&lt;BR /&gt;&lt;EM&gt;-&amp;gt; 600,000 *(1/10) = 60,000 ticks&lt;/EM&gt; (very close to the max ticks 65,534).&lt;/P&gt;
&lt;P&gt;Then you have 60,000 ticks for duty cycle resolution. Same math for PWM generation.&lt;/P&gt;
&lt;P&gt;Hope it helps you.&lt;/P&gt;
&lt;P&gt;If you have more questions, please help us creating a &lt;STRONG&gt;new&lt;/STRONG&gt; post.&lt;/P&gt;
&lt;P&gt;Have a nice day!&lt;/P&gt;</description>
      <pubDate>Mon, 28 Apr 2025 21:02:23 GMT</pubDate>
      <guid>https://community.nxp.com/t5/S32K/s32k312-Measure-the-pwm-pulse-using-eMIOS/m-p/2088685#M48254</guid>
      <dc:creator>_Leo_</dc:creator>
      <dc:date>2025-04-28T21:02:23Z</dc:date>
    </item>
  </channel>
</rss>

