<?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: S32K148EVB: Measure duty cycle using FTM PWM in S32K</title>
    <link>https://community.nxp.com/t5/S32K/S32K148EVB-Measure-duty-cycle-using-FTM-PWM/m-p/2104403#M49195</link>
    <description>&lt;BLOCKQUOTE&gt;&lt;P&gt;Hello,&lt;/P&gt;&lt;P&gt;I am currently using S32 Design Studio 3.5 with the S32K148 MCU. I have configured a port as an input and I would like to measure both the duty cycle and frequency using the FTM (FlexTimer Module) in PWM input mode.&lt;/P&gt;&lt;P&gt;However, the example code provided (specifically in the S32K148_signal_measurement project) seems to only cover frequency measurement. Could you please guide me on:&lt;/P&gt;&lt;OL&gt;&lt;LI&gt;&lt;P&gt;Which FTM mode should I use to measure both duty cycle and frequency?&lt;/P&gt;&lt;/LI&gt;&lt;LI&gt;&lt;P&gt;Is there any example code or sample implementation available that demonstrates duty cycle measurement using FTM?&lt;/P&gt;&lt;/LI&gt;&lt;/OL&gt;&lt;P&gt;Any help or code snippets would be greatly appreciated.&lt;/P&gt;&lt;P&gt;Thank you&lt;/P&gt;&lt;/BLOCKQUOTE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;!-- StartFragment  --&gt;&lt;/P&gt;&lt;P&gt;You're on the right track with the FTM in PWM input mode! To measure both duty cycle and frequency, you should use the &lt;STRONG&gt;FTM in Input Capture mode&lt;/STRONG&gt;. This mode allows you to capture the rising and falling edges of the PWM signal, which can then be used to calculate both the frequency and duty cycle.&lt;/P&gt;&lt;P&gt;For example implementations:&lt;/P&gt;&lt;UL&gt;&lt;LI&gt;The &lt;STRONG&gt;NXP Community&lt;/STRONG&gt; has a discussion on measuring duty cycle using FTM PWM, which might be helpful for your use case.&lt;/LI&gt;&lt;LI&gt;The &lt;STRONG&gt;S32K1xx Series Cookbook&lt;/STRONG&gt; provides software examples, including FTM usage.&lt;/LI&gt;&lt;LI&gt;There is also a &lt;STRONG&gt;GitHub repository&lt;/STRONG&gt; with S32K148 cookbook examples that might contain relevant implementations.&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;&lt;!-- EndFragment  --&gt;&lt;/P&gt;</description>
    <pubDate>Mon, 26 May 2025 10:39:19 GMT</pubDate>
    <dc:creator>cherry45scott</dc:creator>
    <dc:date>2025-05-26T10:39:19Z</dc:date>
    <item>
      <title>S32K148EVB: Measure duty cycle using FTM PWM</title>
      <link>https://community.nxp.com/t5/S32K/S32K148EVB-Measure-duty-cycle-using-FTM-PWM/m-p/2103872#M49168</link>
      <description>&lt;P&gt;Hello,&lt;/P&gt;&lt;P&gt;I am currently using S32 Design Studio 3.5 with the S32K148 MCU. I have configured a port as an input and I would like to measure both the duty cycle and frequency using the FTM (FlexTimer Module) in PWM input mode.&lt;/P&gt;&lt;P&gt;However, the example code provided (specifically in the S32K148_signal_measurement project) seems to only cover frequency measurement. Could you please guide me on:&lt;/P&gt;&lt;OL&gt;&lt;LI&gt;&lt;P&gt;Which FTM mode should I use to measure both duty cycle and frequency?&lt;/P&gt;&lt;/LI&gt;&lt;LI&gt;&lt;P&gt;Is there any example code or sample implementation available that demonstrates duty cycle measurement using FTM?&lt;/P&gt;&lt;/LI&gt;&lt;/OL&gt;&lt;P&gt;Any help or code snippets would be greatly appreciated.&lt;/P&gt;&lt;P&gt;Thank you&lt;/P&gt;</description>
      <pubDate>Sun, 25 May 2025 10:09:59 GMT</pubDate>
      <guid>https://community.nxp.com/t5/S32K/S32K148EVB-Measure-duty-cycle-using-FTM-PWM/m-p/2103872#M49168</guid>
      <dc:creator>emb02</dc:creator>
      <dc:date>2025-05-25T10:09:59Z</dc:date>
    </item>
    <item>
      <title>Re: S32K148EVB: Measure duty cycle using FTM PWM</title>
      <link>https://community.nxp.com/t5/S32K/S32K148EVB-Measure-duty-cycle-using-FTM-PWM/m-p/2104256#M49182</link>
      <description>&lt;P&gt;Hi@&lt;SPAN&gt;emb02&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;here is a similar demo for your reference.&lt;/P&gt;
&lt;P&gt;in this demo, FTM ICU mode used for measure duty cycle and frequency.&lt;/P&gt;
&lt;P&gt;&lt;A href="https://community.nxp.com/t5/S32K-Knowledge-Base/S32K1-Calculate-the-motor-speed-based-on-the-FTM/ta-p/1515933" target="_blank"&gt;https://community.nxp.com/t5/S32K-Knowledge-Base/S32K1-Calculate-the-motor-speed-based-on-the-FTM/ta-p/1515933&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 26 May 2025 08:38:42 GMT</pubDate>
      <guid>https://community.nxp.com/t5/S32K/S32K148EVB-Measure-duty-cycle-using-FTM-PWM/m-p/2104256#M49182</guid>
      <dc:creator>Senlent</dc:creator>
      <dc:date>2025-05-26T08:38:42Z</dc:date>
    </item>
    <item>
      <title>Re: S32K148EVB: Measure duty cycle using FTM PWM</title>
      <link>https://community.nxp.com/t5/S32K/S32K148EVB-Measure-duty-cycle-using-FTM-PWM/m-p/2104403#M49195</link>
      <description>&lt;BLOCKQUOTE&gt;&lt;P&gt;Hello,&lt;/P&gt;&lt;P&gt;I am currently using S32 Design Studio 3.5 with the S32K148 MCU. I have configured a port as an input and I would like to measure both the duty cycle and frequency using the FTM (FlexTimer Module) in PWM input mode.&lt;/P&gt;&lt;P&gt;However, the example code provided (specifically in the S32K148_signal_measurement project) seems to only cover frequency measurement. Could you please guide me on:&lt;/P&gt;&lt;OL&gt;&lt;LI&gt;&lt;P&gt;Which FTM mode should I use to measure both duty cycle and frequency?&lt;/P&gt;&lt;/LI&gt;&lt;LI&gt;&lt;P&gt;Is there any example code or sample implementation available that demonstrates duty cycle measurement using FTM?&lt;/P&gt;&lt;/LI&gt;&lt;/OL&gt;&lt;P&gt;Any help or code snippets would be greatly appreciated.&lt;/P&gt;&lt;P&gt;Thank you&lt;/P&gt;&lt;/BLOCKQUOTE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;!-- StartFragment  --&gt;&lt;/P&gt;&lt;P&gt;You're on the right track with the FTM in PWM input mode! To measure both duty cycle and frequency, you should use the &lt;STRONG&gt;FTM in Input Capture mode&lt;/STRONG&gt;. This mode allows you to capture the rising and falling edges of the PWM signal, which can then be used to calculate both the frequency and duty cycle.&lt;/P&gt;&lt;P&gt;For example implementations:&lt;/P&gt;&lt;UL&gt;&lt;LI&gt;The &lt;STRONG&gt;NXP Community&lt;/STRONG&gt; has a discussion on measuring duty cycle using FTM PWM, which might be helpful for your use case.&lt;/LI&gt;&lt;LI&gt;The &lt;STRONG&gt;S32K1xx Series Cookbook&lt;/STRONG&gt; provides software examples, including FTM usage.&lt;/LI&gt;&lt;LI&gt;There is also a &lt;STRONG&gt;GitHub repository&lt;/STRONG&gt; with S32K148 cookbook examples that might contain relevant implementations.&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;&lt;!-- EndFragment  --&gt;&lt;/P&gt;</description>
      <pubDate>Mon, 26 May 2025 10:39:19 GMT</pubDate>
      <guid>https://community.nxp.com/t5/S32K/S32K148EVB-Measure-duty-cycle-using-FTM-PWM/m-p/2104403#M49195</guid>
      <dc:creator>cherry45scott</dc:creator>
      <dc:date>2025-05-26T10:39:19Z</dc:date>
    </item>
  </channel>
</rss>

