<?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 How to use GPT timer Channels on RT1024 in Model-Based Design Toolbox (MBDT)</title>
    <link>https://community.nxp.com/t5/Model-Based-Design-Toolbox-MBDT/How-to-use-GPT-timer-Channels-on-RT1024/m-p/1725650#M8526</link>
    <description>&lt;P&gt;Hello,&lt;/P&gt;&lt;P&gt;currently I am trying to evaluate the i.MX RT1024 for use in a future product.&lt;/P&gt;&lt;P&gt;I'm trying to create a simple application with two timer driven subsystems, where one subsystem is executed at 1ms and the other subsystem is executed at 10ms.&lt;/P&gt;&lt;P&gt;I chose to use channel 1 and 2 of GPT2 for this purpose. However, when I run the project, both of the subsystems run at the same 10ms rate.&lt;BR /&gt;How can I run two tasks from the same timer but from different channels using the MBDT?&lt;/P&gt;&lt;P&gt;The attached solution is the closest I could manage. The attached model is entirely self-contained - no need for the simulink project (if you are asked to open the project file as well)&lt;/P&gt;</description>
    <pubDate>Tue, 19 Sep 2023 16:02:00 GMT</pubDate>
    <dc:creator>Patrick_K</dc:creator>
    <dc:date>2023-09-19T16:02:00Z</dc:date>
    <item>
      <title>How to use GPT timer Channels on RT1024</title>
      <link>https://community.nxp.com/t5/Model-Based-Design-Toolbox-MBDT/How-to-use-GPT-timer-Channels-on-RT1024/m-p/1725650#M8526</link>
      <description>&lt;P&gt;Hello,&lt;/P&gt;&lt;P&gt;currently I am trying to evaluate the i.MX RT1024 for use in a future product.&lt;/P&gt;&lt;P&gt;I'm trying to create a simple application with two timer driven subsystems, where one subsystem is executed at 1ms and the other subsystem is executed at 10ms.&lt;/P&gt;&lt;P&gt;I chose to use channel 1 and 2 of GPT2 for this purpose. However, when I run the project, both of the subsystems run at the same 10ms rate.&lt;BR /&gt;How can I run two tasks from the same timer but from different channels using the MBDT?&lt;/P&gt;&lt;P&gt;The attached solution is the closest I could manage. The attached model is entirely self-contained - no need for the simulink project (if you are asked to open the project file as well)&lt;/P&gt;</description>
      <pubDate>Tue, 19 Sep 2023 16:02:00 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Model-Based-Design-Toolbox-MBDT/How-to-use-GPT-timer-Channels-on-RT1024/m-p/1725650#M8526</guid>
      <dc:creator>Patrick_K</dc:creator>
      <dc:date>2023-09-19T16:02:00Z</dc:date>
    </item>
    <item>
      <title>Re: How to use GPT timer Channels on RT1024</title>
      <link>https://community.nxp.com/t5/Model-Based-Design-Toolbox-MBDT/How-to-use-GPT-timer-Channels-on-RT1024/m-p/1738763#M8588</link>
      <description>&lt;P&gt;Hi,&amp;nbsp;&lt;a href="https://community.nxp.com/t5/user/viewprofilepage/user-id/222858"&gt;@Patrick_K&lt;/a&gt;,&lt;/P&gt;
&lt;P&gt;Thank you for using MBDT for i.MX on your projects.&lt;/P&gt;
&lt;P&gt;I have downloaded the attached example and tried to run it on my side considering your specific requirements of using the GPT2 instance with two channels configured but I didn't encounter any issues.&lt;/P&gt;
&lt;P&gt;I have replaced the two subsystems provided with an LED toggle, but I have kept the logic for the interrupts generated by the GPT2 peripheral. &lt;SPAN&gt;The attached example demonstrates how the board LED is controlled by two interrupts from channel 1 and channel 2. The interrupt from channel 2 occurs every 2 seconds and turns on the LED, while the interrupt from channel 1 occurs every 2.5 seconds and turns off the LED right after it has been on for 0.5 seconds.&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;In the picture below is the actual&amp;nbsp;configuration, where I highlighted the Output&amp;nbsp;Compare interrupt&amp;nbsp;enablement for both Channel 1 and Channel 2, along with the Compare value (period) that is set to 2 seconds&amp;nbsp;for the second channel and to 2.5 seconds for the first one.&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="georgevictor_0-1697122824351.png" style="width: 400px;"&gt;&lt;img src="https://community.nxp.com/t5/image/serverpage/image-id/244844i548FA3CAD6C9D0B4/image-size/medium?v=v2&amp;amp;px=400" role="button" title="georgevictor_0-1697122824351.png" alt="georgevictor_0-1697122824351.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;Please let me know if this model works as expected on your side and if it helps you find the issue with your project.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Cheers,&lt;/P&gt;
&lt;P&gt;Victor&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 12 Oct 2023 15:16:56 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Model-Based-Design-Toolbox-MBDT/How-to-use-GPT-timer-Channels-on-RT1024/m-p/1738763#M8588</guid>
      <dc:creator>georgevictor</dc:creator>
      <dc:date>2023-10-12T15:16:56Z</dc:date>
    </item>
  </channel>
</rss>

