<?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: FlexPWM interrupt not triggering in Zephyr while SDK example works as expected in Zephyr Project</title>
    <link>https://community.nxp.com/t5/Zephyr-Project/FlexPWM-interrupt-not-triggering-in-Zephyr-while-SDK-example/m-p/2300081#M587</link>
    <description>&lt;P&gt;Hello&amp;nbsp;&lt;a href="https://community.nxp.com/t5/user/viewprofilepage/user-id/243115"&gt;@wima88&lt;/a&gt;&amp;nbsp;&lt;/P&gt;
&lt;DIV&gt;
&lt;P&gt;Thanks for your patience. I confirmed with our internal Zephyr expert. In your project, you are using the MCUXpresso SDK driver instead of the Zephyr driver. This may cause potential conflicts.&lt;/P&gt;
&lt;P&gt;Your application uses Flexcomm1 submodule 0, which is also enabled in the Zephyr devicetree for the FRDM‑MCXN947 board. If it is enabled, Zephyr will initialize the &lt;A href="https://github.com/zephyrproject-rtos/zephyr/blob/main/drivers/pwm/pwm_mcux.c" target="_self"&gt;FlexPWM driver&lt;/A&gt; in the startup code before &lt;CODE&gt;main()&lt;/CODE&gt; executes.&lt;/P&gt;
&lt;P&gt;Therefore, if you choose to configure FlexPWM in your application as you are doing now, you should disable the FlexPWM node in the devicetree to avoid conflicts.&lt;/P&gt;
&lt;P&gt;Thank you.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;BR&lt;/P&gt;
&lt;P&gt;Alice&lt;/P&gt;
&lt;/DIV&gt;</description>
    <pubDate>Mon, 26 Jan 2026 02:11:30 GMT</pubDate>
    <dc:creator>Alice_Yang</dc:creator>
    <dc:date>2026-01-26T02:11:30Z</dc:date>
    <item>
      <title>FlexPWM interrupt not triggering in Zephyr while SDK example works as expected</title>
      <link>https://community.nxp.com/t5/Zephyr-Project/FlexPWM-interrupt-not-triggering-in-Zephyr-while-SDK-example/m-p/2291971#M581</link>
      <description>&lt;P&gt;Zephyr &lt;STRONG&gt;4.3.0&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;MCUExpresso SDK &lt;STRONG&gt;2.16&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;Application note used for Example&amp;nbsp;&lt;STRONG&gt;AN14196&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;Board used&amp;nbsp;&lt;STRONG&gt;mcx_n9xx_evk/mcxn947/cpu0&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Description:&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;I am trying to replicate an NXP SDK FlexPWM example in Zephyr OS. The main goal is to reproduce the SDK behavior where:&lt;/P&gt;&lt;UL&gt;&lt;LI&gt;&lt;P&gt;A simple PWM signal is generated using the FlexPWM peripheral.&lt;/P&gt;&lt;/LI&gt;&lt;LI&gt;&lt;P&gt;A callback (interrupt handler) is executed after a specified number of PWM edges are counted(Via E-capture).&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;&lt;STRONG&gt;SDK Behavior (Working):&lt;/STRONG&gt;&lt;/P&gt;&lt;UL&gt;&lt;LI&gt;&lt;P&gt;Using the SDK pwm.c example, the PWM signal is generated correctly.&lt;/P&gt;&lt;/LI&gt;&lt;LI&gt;&lt;P&gt;The FlexPWM interrupt fires as expected.&lt;/P&gt;&lt;/LI&gt;&lt;LI&gt;&lt;P&gt;The callback function executes once the configured number of edges is reached.&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;&lt;STRONG&gt;Zephyr Behavior (Issue):&lt;/STRONG&gt;&lt;/P&gt;&lt;UL&gt;&lt;LI&gt;&lt;P&gt;Using Zephyr, I am able to successfully generate the PWM signal with the FlexPWM peripheral.&lt;/P&gt;&lt;/LI&gt;&lt;LI&gt;&lt;P&gt;However, the FlexPWM interrupt is never triggered , and the callback function is never executed.&lt;/P&gt;&lt;P&gt;(&lt;EM&gt;&lt;SPAN&gt;IRQ_CONNECT&lt;/SPAN&gt;&lt;SPAN&gt;(&lt;/SPAN&gt;&lt;SPAN&gt;120&lt;/SPAN&gt;&lt;SPAN&gt;, &lt;/SPAN&gt;&lt;SPAN&gt;0&lt;/SPAN&gt;&lt;SPAN&gt;, &lt;/SPAN&gt;&lt;SPAN&gt;FLEXPWM1_SUBMODULE0_IRQHandler&lt;/SPAN&gt;&lt;SPAN&gt;, &lt;/SPAN&gt;&lt;SPAN&gt;NULL&lt;/SPAN&gt;&lt;SPAN&gt;, &lt;/SPAN&gt;&lt;SPAN&gt;0&lt;/SPAN&gt;&lt;/EM&gt;&lt;SPAN&gt;&lt;EM&gt;);&lt;/EM&gt; was used to connect the interrupt line to IRQHandler&amp;nbsp;&amp;nbsp;&lt;/SPAN&gt;)&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;&lt;STRONG&gt;Debugging and Investigation Done So Far:&lt;/STRONG&gt;&lt;/P&gt;&lt;UL&gt;&lt;LI&gt;&lt;P&gt;I compared the FlexPWM register configurations between:&lt;/P&gt;&lt;UL&gt;&lt;LI&gt;&lt;P&gt;The SDK example (&lt;STRONG&gt;pwm.c&lt;/STRONG&gt;)&lt;/P&gt;&lt;/LI&gt;&lt;LI&gt;&lt;P&gt;The Zephyr application (&lt;STRONG&gt;main.c&lt;/STRONG&gt;)&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;/LI&gt;&lt;LI&gt;&lt;P&gt;All relevant register values appear to match during the peripheral setup phase.&lt;/P&gt;&lt;/LI&gt;&lt;LI&gt;&lt;P&gt;I disabled Zephyr power management to ensure the CPU is not entering a low-power state by adding following configs&amp;nbsp;&lt;/P&gt;&lt;DIV class=""&gt;&lt;DIV class=""&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV class=""&gt;&lt;SPAN&gt;&lt;SPAN class=""&gt;CONFIG_PM&lt;/SPAN&gt;=n &lt;SPAN class=""&gt;CONFIG_PM_DEVICE&lt;/SPAN&gt;=n &lt;/SPAN&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;P&gt;This change did not affect the behavior—the interrupt is still not triggered.&lt;/P&gt;&lt;/LI&gt;&lt;LI&gt;&lt;P&gt;PWM output on the pin is correct, which suggests the peripheral clocking and basic configuration are working.&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;&lt;STRONG&gt;Question / Request for Help:&lt;/STRONG&gt;&lt;/P&gt;&lt;UL&gt;&lt;LI&gt;&lt;P&gt;Are there any Zephyr-specific requirements for enabling FlexPWM interrupts (e.g., IRQ configuration, ISR registration, clock gating, or NVIC setup) that differ from the SDK?&lt;/P&gt;&lt;/LI&gt;&lt;LI&gt;&lt;P&gt;Is there anything additional that must be done in Zephyr to ensure FlexPWM interrupts are properly routed and handled?&lt;/P&gt;&lt;/LI&gt;&lt;LI&gt;&lt;P&gt;Are there known limitations or missing support for FlexPWM edge-count interrupts in Zephyr?&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;Any guidance on how to correctly enable and handle FlexPWM interrupts in Zephyr would be greatly appreciated.&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Thank you.&lt;/STRONG&gt;&lt;/P&gt;</description>
      <pubDate>Mon, 12 Jan 2026 20:24:44 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Zephyr-Project/FlexPWM-interrupt-not-triggering-in-Zephyr-while-SDK-example/m-p/2291971#M581</guid>
      <dc:creator>wima88</dc:creator>
      <dc:date>2026-01-12T20:24:44Z</dc:date>
    </item>
    <item>
      <title>Re: FlexPWM interrupt not triggering in Zephyr while SDK example works as expected</title>
      <link>https://community.nxp.com/t5/Zephyr-Project/FlexPWM-interrupt-not-triggering-in-Zephyr-while-SDK-example/m-p/2292493#M583</link>
      <description>&lt;P&gt;Hello&amp;nbsp;&lt;a href="https://community.nxp.com/t5/user/viewprofilepage/user-id/243115"&gt;@wima88&lt;/a&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;DIV&gt;After building, please check the &lt;CODE&gt;.config&lt;/CODE&gt; file to confirm that the interrupt is enabled.&lt;/DIV&gt;
&lt;DIV&gt;Also you can send it to me, I help you check.&lt;/DIV&gt;
&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;
&lt;DIV&gt;Thank you.&amp;nbsp;&lt;/DIV&gt;
&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;
&lt;DIV&gt;BR&lt;/DIV&gt;
&lt;DIV&gt;Alice&lt;/DIV&gt;
&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;
&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;</description>
      <pubDate>Tue, 13 Jan 2026 10:39:18 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Zephyr-Project/FlexPWM-interrupt-not-triggering-in-Zephyr-while-SDK-example/m-p/2292493#M583</guid>
      <dc:creator>Alice_Yang</dc:creator>
      <dc:date>2026-01-13T10:39:18Z</dc:date>
    </item>
    <item>
      <title>Re: FlexPWM interrupt not triggering in Zephyr while SDK example works as expected</title>
      <link>https://community.nxp.com/t5/Zephyr-Project/FlexPWM-interrupt-not-triggering-in-Zephyr-while-SDK-example/m-p/2293378#M584</link>
      <description>&lt;P&gt;Hi Alice ,&amp;nbsp;&lt;/P&gt;&lt;P&gt;I Scan the .config and could not find any red flags their. I upload the .config as well(had to rename since .config is not supported).&amp;nbsp;&lt;/P&gt;&lt;P&gt;After further investigation into the Zephyr base setup, I noticed the following behavior difference between Zephyr and the MCUX SDK:&lt;/P&gt;&lt;UL&gt;&lt;LI&gt;&lt;P&gt;Even though the FlexPWM register configuration and values are identical between Zephyr and the SDK, the &lt;STRONG&gt;interrupt is never triggered by the peripheral itself in Zephyr&lt;/STRONG&gt; after initialization.&lt;/P&gt;&lt;/LI&gt;&lt;LI&gt;&lt;P&gt;In the MCUX SDK, I can observe that the &lt;STRONG&gt;SM0STS register bits CFB0 and CFB1 are being set periodically&lt;/STRONG&gt;, which results in the expected interrupt behavior.&lt;/P&gt;&lt;/LI&gt;&lt;LI&gt;&lt;P&gt;In Zephyr, these same status bits (SM0STS-&amp;gt;CFB0 and SM0STS-&amp;gt;CFB1) are &lt;STRONG&gt;never set&lt;/STRONG&gt;, even though:&lt;/P&gt;&lt;UL&gt;&lt;LI&gt;&lt;P&gt;The peripheral setup is identical&lt;/P&gt;&lt;/LI&gt;&lt;LI&gt;&lt;P&gt;The PWM output is correct&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;/LI&gt;&lt;LI&gt;&lt;P&gt;During the initial peripheral setup, these bits are automatically set once on both the SDK and Zephyr sides, and &lt;STRONG&gt;both environments execute the IRQ handler once during this initial setup&lt;/STRONG&gt;.&lt;/P&gt;&lt;/LI&gt;&lt;LI&gt;&lt;P&gt;However, &lt;STRONG&gt;after this initial IRQ execution&lt;/STRONG&gt;, the interrupt status bits are never toggled again in Zephyr, and no further interrupts occur.&lt;/P&gt;&lt;/LI&gt;&lt;LI&gt;&lt;P&gt;In contrast, the MCUX SDK continues to toggle these status bits periodically as expected, resulting in repeated interrupt callbacks.&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;This suggests that while the initial interrupt path is functional in Zephyr, the FlexPWM peripheral does not continue generating interrupt events afterward, despite identical register configuration.&lt;/P&gt;&lt;P&gt;Any insight into why the FlexPWM status bits (CFB0/CFB1) are not being set in Zephyr, or whether additional Zephyr-specific handling is required to enable periodic interrupt generation, would be greatly appreciated.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 14 Jan 2026 14:08:21 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Zephyr-Project/FlexPWM-interrupt-not-triggering-in-Zephyr-while-SDK-example/m-p/2293378#M584</guid>
      <dc:creator>wima88</dc:creator>
      <dc:date>2026-01-14T14:08:21Z</dc:date>
    </item>
    <item>
      <title>Re: FlexPWM interrupt not triggering in Zephyr while SDK example works as expected</title>
      <link>https://community.nxp.com/t5/Zephyr-Project/FlexPWM-interrupt-not-triggering-in-Zephyr-while-SDK-example/m-p/2300081#M587</link>
      <description>&lt;P&gt;Hello&amp;nbsp;&lt;a href="https://community.nxp.com/t5/user/viewprofilepage/user-id/243115"&gt;@wima88&lt;/a&gt;&amp;nbsp;&lt;/P&gt;
&lt;DIV&gt;
&lt;P&gt;Thanks for your patience. I confirmed with our internal Zephyr expert. In your project, you are using the MCUXpresso SDK driver instead of the Zephyr driver. This may cause potential conflicts.&lt;/P&gt;
&lt;P&gt;Your application uses Flexcomm1 submodule 0, which is also enabled in the Zephyr devicetree for the FRDM‑MCXN947 board. If it is enabled, Zephyr will initialize the &lt;A href="https://github.com/zephyrproject-rtos/zephyr/blob/main/drivers/pwm/pwm_mcux.c" target="_self"&gt;FlexPWM driver&lt;/A&gt; in the startup code before &lt;CODE&gt;main()&lt;/CODE&gt; executes.&lt;/P&gt;
&lt;P&gt;Therefore, if you choose to configure FlexPWM in your application as you are doing now, you should disable the FlexPWM node in the devicetree to avoid conflicts.&lt;/P&gt;
&lt;P&gt;Thank you.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;BR&lt;/P&gt;
&lt;P&gt;Alice&lt;/P&gt;
&lt;/DIV&gt;</description>
      <pubDate>Mon, 26 Jan 2026 02:11:30 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Zephyr-Project/FlexPWM-interrupt-not-triggering-in-Zephyr-while-SDK-example/m-p/2300081#M587</guid>
      <dc:creator>Alice_Yang</dc:creator>
      <dc:date>2026-01-26T02:11:30Z</dc:date>
    </item>
    <item>
      <title>Re: FlexPWM interrupt not triggering in Zephyr while SDK example works as expected</title>
      <link>https://community.nxp.com/t5/Zephyr-Project/FlexPWM-interrupt-not-triggering-in-Zephyr-while-SDK-example/m-p/2303858#M591</link>
      <description>&lt;P class=""&gt;Thank you. I understand that their may be a conflict because Zephyr initializes the FlexPWM driver before main() executes.&lt;/P&gt;&lt;P class=""&gt;However, I need to verify something: if I'm correct, Zephyr's devicetree is also handling the pin mux configuration through pinctrl. If I disable the flexpwm1 node in the devicetree to avoid the conflict, would I then need to manually set up the pin mux configuration in my application code, or will the pinctrl settings remain active even with the node disabled?&lt;/P&gt;&lt;P class=""&gt;&amp;nbsp;&lt;/P&gt;&lt;P class=""&gt;Wimansha&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 30 Jan 2026 14:48:31 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Zephyr-Project/FlexPWM-interrupt-not-triggering-in-Zephyr-while-SDK-example/m-p/2303858#M591</guid>
      <dc:creator>wima88</dc:creator>
      <dc:date>2026-01-30T14:48:31Z</dc:date>
    </item>
    <item>
      <title>Re: FlexPWM interrupt not triggering in Zephyr while SDK example works as expected</title>
      <link>https://community.nxp.com/t5/Zephyr-Project/FlexPWM-interrupt-not-triggering-in-Zephyr-while-SDK-example/m-p/2304568#M595</link>
      <description>&lt;P&gt;Hello&amp;nbsp;&lt;a href="https://community.nxp.com/t5/user/viewprofilepage/user-id/243115"&gt;@wima88&lt;/a&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;”&lt;SPAN&gt;if I'm correct, Zephyr's devicetree is also handling the pin mux configuration through pinctrl. If I disable the flexpwm1 node in the devicetree to avoid the conflict, would I then need to manually set up the pin mux configuration in my application code,&amp;nbsp;&lt;/SPAN&gt;“&lt;/P&gt;
&lt;P&gt;-&amp;gt;&amp;gt; Yes.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;BR&lt;/P&gt;
&lt;P&gt;Alice&lt;/P&gt;</description>
      <pubDate>Mon, 02 Feb 2026 09:53:57 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Zephyr-Project/FlexPWM-interrupt-not-triggering-in-Zephyr-while-SDK-example/m-p/2304568#M595</guid>
      <dc:creator>Alice_Yang</dc:creator>
      <dc:date>2026-02-02T09:53:57Z</dc:date>
    </item>
  </channel>
</rss>

