<?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: S32K144EVB MBD GPI ISR not working in Model-Based Design Toolbox (MBDT)</title>
    <link>https://community.nxp.com/t5/Model-Based-Design-Toolbox-MBDT/S32K144EVB-MBD-GPI-ISR-not-working/m-p/765699#M1962</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi &lt;A class="jx-jive-macro-user" href="https://community.nxp.com/people/ruicui"&gt;ruicui&lt;/A&gt;‌,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Couple of things you should consider:&lt;/P&gt;&lt;P&gt;1: Due to a limitation in the SDK version release with MBDT v.3.0.0 the ISR&amp;nbsp;functionality can't be used in the same time with Read/Write GPI functionality.&lt;/P&gt;&lt;P&gt;2: To have the GPI ISR working on a pin, you first have to initialize the pin (e.g. using a GPI read block that has a higher Simulink Priority than GPI ISR) and then use only GPI ISR block to read from the associated pin using a data variable to hold the states.&lt;/P&gt;&lt;P&gt;3: Please use interrupt on edge transition rather than level since you might overrun the CPU with interrupts. The alternative would be to use the enable/disable interrupt once you are o a level.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Here is an example of how you should tackle the problem.&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper" image-alt="pastedImage_4.png"&gt;&lt;img src="https://community.nxp.com/t5/image/serverpage/image-id/20241i23E4383497812BA7/image-size/large?v=v2&amp;amp;px=999" role="button" title="pastedImage_4.png" alt="pastedImage_4.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;In this example i'm going to initialize the PTC13 as input and read it's value in RED_LED_STATUS&lt;/P&gt;&lt;P&gt;Then, i'm going to initialize the GPI ISR on either edges of PTC13 and use the subsystem to negate the value of the RED_LED_STATUS each time a ISR is triggered.&lt;/P&gt;&lt;P&gt;Ultimately the status of another GPO is set based on the actual value of the RED_LED_STATUS. This is done on the standard Simulink step function.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The Freemaster block is optional but it is a good option to check the values of the RED_LED_STATUS and how it changes when the ISR is generated as a press of button.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Hope this helps!&lt;/P&gt;&lt;P&gt;Daniel&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Mon, 11 Jun 2018 09:03:06 GMT</pubDate>
    <dc:creator>Daniel_Popa</dc:creator>
    <dc:date>2018-06-11T09:03:06Z</dc:date>
    <item>
      <title>S32K144EVB MBD GPI ISR not working</title>
      <link>https://community.nxp.com/t5/Model-Based-Design-Toolbox-MBDT/S32K144EVB-MBD-GPI-ISR-not-working/m-p/765698#M1961</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Dear support,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I am using model based design tool box to check GPI ISR function. However, I can't get expected result. It seems like PTE16 is always set as logic 0 no matter what voltage I feed(5v or 0v), GPI read block works as intended.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper" image-alt="Untitled.png"&gt;&lt;img src="https://community.nxp.com/t5/image/serverpage/image-id/6585i3ADF8FF66EC94EB3/image-size/large?v=v2&amp;amp;px=999" role="button" title="Untitled.png" alt="Untitled.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks,&lt;/P&gt;&lt;P&gt;Ray&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 08 Jun 2018 20:51:34 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Model-Based-Design-Toolbox-MBDT/S32K144EVB-MBD-GPI-ISR-not-working/m-p/765698#M1961</guid>
      <dc:creator>ruicui</dc:creator>
      <dc:date>2018-06-08T20:51:34Z</dc:date>
    </item>
    <item>
      <title>Re: S32K144EVB MBD GPI ISR not working</title>
      <link>https://community.nxp.com/t5/Model-Based-Design-Toolbox-MBDT/S32K144EVB-MBD-GPI-ISR-not-working/m-p/765699#M1962</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi &lt;A class="jx-jive-macro-user" href="https://community.nxp.com/people/ruicui"&gt;ruicui&lt;/A&gt;‌,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Couple of things you should consider:&lt;/P&gt;&lt;P&gt;1: Due to a limitation in the SDK version release with MBDT v.3.0.0 the ISR&amp;nbsp;functionality can't be used in the same time with Read/Write GPI functionality.&lt;/P&gt;&lt;P&gt;2: To have the GPI ISR working on a pin, you first have to initialize the pin (e.g. using a GPI read block that has a higher Simulink Priority than GPI ISR) and then use only GPI ISR block to read from the associated pin using a data variable to hold the states.&lt;/P&gt;&lt;P&gt;3: Please use interrupt on edge transition rather than level since you might overrun the CPU with interrupts. The alternative would be to use the enable/disable interrupt once you are o a level.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Here is an example of how you should tackle the problem.&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper" image-alt="pastedImage_4.png"&gt;&lt;img src="https://community.nxp.com/t5/image/serverpage/image-id/20241i23E4383497812BA7/image-size/large?v=v2&amp;amp;px=999" role="button" title="pastedImage_4.png" alt="pastedImage_4.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;In this example i'm going to initialize the PTC13 as input and read it's value in RED_LED_STATUS&lt;/P&gt;&lt;P&gt;Then, i'm going to initialize the GPI ISR on either edges of PTC13 and use the subsystem to negate the value of the RED_LED_STATUS each time a ISR is triggered.&lt;/P&gt;&lt;P&gt;Ultimately the status of another GPO is set based on the actual value of the RED_LED_STATUS. This is done on the standard Simulink step function.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The Freemaster block is optional but it is a good option to check the values of the RED_LED_STATUS and how it changes when the ISR is generated as a press of button.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Hope this helps!&lt;/P&gt;&lt;P&gt;Daniel&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 11 Jun 2018 09:03:06 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Model-Based-Design-Toolbox-MBDT/S32K144EVB-MBD-GPI-ISR-not-working/m-p/765699#M1962</guid>
      <dc:creator>Daniel_Popa</dc:creator>
      <dc:date>2018-06-11T09:03:06Z</dc:date>
    </item>
  </channel>
</rss>

