<?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 Timing Delays in FTM Input Edge Capture and Periodic Interrupt Timer Implementation S32k144 in Model-Based Design Toolbox (MBDT)</title>
    <link>https://community.nxp.com/t5/Model-Based-Design-Toolbox-MBDT/Timing-Delays-in-FTM-Input-Edge-Capture-and-Periodic-Interrupt/m-p/2039684#M9973</link>
    <description>&lt;P&gt;I am working on a project involving a crank signal (36-2) and using the FTM Input Edge Capture block to detect the falling edges. The configuration is as follows:&lt;/P&gt;&lt;OL&gt;&lt;LI&gt;&lt;P&gt;&lt;STRONG&gt;FTM Input Edge Capture Block:&lt;/STRONG&gt;&lt;/P&gt;&lt;UL&gt;&lt;LI&gt;Configured for falling edge detection.&lt;/LI&gt;&lt;LI&gt;Outputs a timestamp for each falling edge.&lt;/LI&gt;&lt;LI&gt;Triggers a function that counts the number of edges and resets back to 0 when needed.&lt;/LI&gt;&lt;/UL&gt;&lt;/LI&gt;&lt;LI&gt;&lt;P&gt;&lt;STRONG&gt;Periodic Interrupt Timer Block:&lt;/STRONG&gt;&lt;/P&gt;&lt;UL&gt;&lt;LI&gt;Configured with a period of 30 microseconds.&lt;/LI&gt;&lt;LI&gt;Triggers another function every 30 microseconds.&lt;/LI&gt;&lt;LI&gt;This function increments a counter, which is reset by the function triggered by the FTM Input Edge Capture block.&lt;/LI&gt;&lt;/UL&gt;&lt;/LI&gt;&lt;/OL&gt;&lt;P&gt;&lt;STRONG&gt;Issue:&lt;/STRONG&gt;&lt;BR /&gt;As the complexity of the logic within the function triggered by the FTM Input Edge Capture block increases, the execution time for this function also increases. This results in a delay between the blue signal (input to the block) and the yellow signal (output of the command block).&lt;/P&gt;&lt;P&gt;Additionally, the function triggered by the 30-microsecond interrupt timer introduces further delay in the logic due to its execution time. This compounding delay is evident in the attached oscilloscope capture:&lt;/P&gt;&lt;UL&gt;&lt;LI&gt;&lt;STRONG&gt;Channel 3 (Blue):&lt;/STRONG&gt; Input signal to the FTM Input Edge Capture block.&lt;/LI&gt;&lt;LI&gt;&lt;STRONG&gt;Channel 1 (Yellow):&lt;/STRONG&gt; Output of the function triggered by the FTM Input Edge Capture block.&lt;/LI&gt;&lt;LI&gt;&lt;STRONG&gt;Channel 4 (Pink):&lt;/STRONG&gt; Delay caused by the interaction between the 30-microsecond timer and the FTM Input Edge Capture block.&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;&lt;STRONG&gt;Question:&lt;/STRONG&gt;&lt;BR /&gt;How can I minimize or manage the execution delays caused by these interactions? Specifically:&lt;/P&gt;&lt;OL&gt;&lt;LI&gt;Is there an optimized way to handle the logic within the function triggered by the FTM Input Edge Capture block to reduce its execution time?&lt;/LI&gt;&lt;LI&gt;Would offloading some of the calculations to a different task or interrupt level help mitigate these delays?&lt;/LI&gt;&lt;LI&gt;Are there any best practices for using the Periodic Interrupt Timer and FTM Input Edge Capture blocks together to avoid cascading delays?&lt;BR /&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Screenshot 2025-02-06 at 9.37.12 PM.png" style="width: 743px;"&gt;&lt;img src="https://community.nxp.com/t5/image/serverpage/image-id/322832i1AE4288D81F4D702/image-size/large?v=v2&amp;amp;px=999" role="button" title="Screenshot 2025-02-06 at 9.37.12 PM.png" alt="Screenshot 2025-02-06 at 9.37.12 PM.png" /&gt;&lt;/span&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Screenshot 2025-02-06 at 9.36.55 PM.png" style="width: 838px;"&gt;&lt;img src="https://community.nxp.com/t5/image/serverpage/image-id/322830iDA615FE10404E69C/image-size/large?v=v2&amp;amp;px=999" role="button" title="Screenshot 2025-02-06 at 9.36.55 PM.png" alt="Screenshot 2025-02-06 at 9.36.55 PM.png" /&gt;&lt;/span&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Screenshot 2025-02-06 at 9.36.39 PM.png" style="width: 350px;"&gt;&lt;img src="https://community.nxp.com/t5/image/serverpage/image-id/322833iCC28703B5A54C18A/image-size/large?v=v2&amp;amp;px=999" role="button" title="Screenshot 2025-02-06 at 9.36.39 PM.png" alt="Screenshot 2025-02-06 at 9.36.39 PM.png" /&gt;&lt;/span&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Screenshot 2025-02-06 at 9.36.10 PM.png" style="width: 965px;"&gt;&lt;img src="https://community.nxp.com/t5/image/serverpage/image-id/322831i0F42A8F24ADBE610/image-size/large?v=v2&amp;amp;px=999" role="button" title="Screenshot 2025-02-06 at 9.36.10 PM.png" alt="Screenshot 2025-02-06 at 9.36.10 PM.png" /&gt;&lt;/span&gt;&lt;/LI&gt;&lt;/OL&gt;</description>
    <pubDate>Fri, 07 Feb 2025 03:53:49 GMT</pubDate>
    <dc:creator>prasannak9488</dc:creator>
    <dc:date>2025-02-07T03:53:49Z</dc:date>
    <item>
      <title>Timing Delays in FTM Input Edge Capture and Periodic Interrupt Timer Implementation S32k144</title>
      <link>https://community.nxp.com/t5/Model-Based-Design-Toolbox-MBDT/Timing-Delays-in-FTM-Input-Edge-Capture-and-Periodic-Interrupt/m-p/2039684#M9973</link>
      <description>&lt;P&gt;I am working on a project involving a crank signal (36-2) and using the FTM Input Edge Capture block to detect the falling edges. The configuration is as follows:&lt;/P&gt;&lt;OL&gt;&lt;LI&gt;&lt;P&gt;&lt;STRONG&gt;FTM Input Edge Capture Block:&lt;/STRONG&gt;&lt;/P&gt;&lt;UL&gt;&lt;LI&gt;Configured for falling edge detection.&lt;/LI&gt;&lt;LI&gt;Outputs a timestamp for each falling edge.&lt;/LI&gt;&lt;LI&gt;Triggers a function that counts the number of edges and resets back to 0 when needed.&lt;/LI&gt;&lt;/UL&gt;&lt;/LI&gt;&lt;LI&gt;&lt;P&gt;&lt;STRONG&gt;Periodic Interrupt Timer Block:&lt;/STRONG&gt;&lt;/P&gt;&lt;UL&gt;&lt;LI&gt;Configured with a period of 30 microseconds.&lt;/LI&gt;&lt;LI&gt;Triggers another function every 30 microseconds.&lt;/LI&gt;&lt;LI&gt;This function increments a counter, which is reset by the function triggered by the FTM Input Edge Capture block.&lt;/LI&gt;&lt;/UL&gt;&lt;/LI&gt;&lt;/OL&gt;&lt;P&gt;&lt;STRONG&gt;Issue:&lt;/STRONG&gt;&lt;BR /&gt;As the complexity of the logic within the function triggered by the FTM Input Edge Capture block increases, the execution time for this function also increases. This results in a delay between the blue signal (input to the block) and the yellow signal (output of the command block).&lt;/P&gt;&lt;P&gt;Additionally, the function triggered by the 30-microsecond interrupt timer introduces further delay in the logic due to its execution time. This compounding delay is evident in the attached oscilloscope capture:&lt;/P&gt;&lt;UL&gt;&lt;LI&gt;&lt;STRONG&gt;Channel 3 (Blue):&lt;/STRONG&gt; Input signal to the FTM Input Edge Capture block.&lt;/LI&gt;&lt;LI&gt;&lt;STRONG&gt;Channel 1 (Yellow):&lt;/STRONG&gt; Output of the function triggered by the FTM Input Edge Capture block.&lt;/LI&gt;&lt;LI&gt;&lt;STRONG&gt;Channel 4 (Pink):&lt;/STRONG&gt; Delay caused by the interaction between the 30-microsecond timer and the FTM Input Edge Capture block.&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;&lt;STRONG&gt;Question:&lt;/STRONG&gt;&lt;BR /&gt;How can I minimize or manage the execution delays caused by these interactions? Specifically:&lt;/P&gt;&lt;OL&gt;&lt;LI&gt;Is there an optimized way to handle the logic within the function triggered by the FTM Input Edge Capture block to reduce its execution time?&lt;/LI&gt;&lt;LI&gt;Would offloading some of the calculations to a different task or interrupt level help mitigate these delays?&lt;/LI&gt;&lt;LI&gt;Are there any best practices for using the Periodic Interrupt Timer and FTM Input Edge Capture blocks together to avoid cascading delays?&lt;BR /&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Screenshot 2025-02-06 at 9.37.12 PM.png" style="width: 743px;"&gt;&lt;img src="https://community.nxp.com/t5/image/serverpage/image-id/322832i1AE4288D81F4D702/image-size/large?v=v2&amp;amp;px=999" role="button" title="Screenshot 2025-02-06 at 9.37.12 PM.png" alt="Screenshot 2025-02-06 at 9.37.12 PM.png" /&gt;&lt;/span&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Screenshot 2025-02-06 at 9.36.55 PM.png" style="width: 838px;"&gt;&lt;img src="https://community.nxp.com/t5/image/serverpage/image-id/322830iDA615FE10404E69C/image-size/large?v=v2&amp;amp;px=999" role="button" title="Screenshot 2025-02-06 at 9.36.55 PM.png" alt="Screenshot 2025-02-06 at 9.36.55 PM.png" /&gt;&lt;/span&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Screenshot 2025-02-06 at 9.36.39 PM.png" style="width: 350px;"&gt;&lt;img src="https://community.nxp.com/t5/image/serverpage/image-id/322833iCC28703B5A54C18A/image-size/large?v=v2&amp;amp;px=999" role="button" title="Screenshot 2025-02-06 at 9.36.39 PM.png" alt="Screenshot 2025-02-06 at 9.36.39 PM.png" /&gt;&lt;/span&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Screenshot 2025-02-06 at 9.36.10 PM.png" style="width: 965px;"&gt;&lt;img src="https://community.nxp.com/t5/image/serverpage/image-id/322831i0F42A8F24ADBE610/image-size/large?v=v2&amp;amp;px=999" role="button" title="Screenshot 2025-02-06 at 9.36.10 PM.png" alt="Screenshot 2025-02-06 at 9.36.10 PM.png" /&gt;&lt;/span&gt;&lt;/LI&gt;&lt;/OL&gt;</description>
      <pubDate>Fri, 07 Feb 2025 03:53:49 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Model-Based-Design-Toolbox-MBDT/Timing-Delays-in-FTM-Input-Edge-Capture-and-Periodic-Interrupt/m-p/2039684#M9973</guid>
      <dc:creator>prasannak9488</dc:creator>
      <dc:date>2025-02-07T03:53:49Z</dc:date>
    </item>
  </channel>
</rss>

