<?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: What am I doing wrong with simple gpio example? in Model-Based Design Toolbox (MBDT)</title>
    <link>https://community.nxp.com/t5/Model-Based-Design-Toolbox-MBDT/What-am-I-doing-wrong-with-simple-gpio-example/m-p/1238230#M5830</link>
    <description>&lt;P&gt;Hello&amp;nbsp;&lt;a href="https://community.nxp.com/t5/user/viewprofilepage/user-id/183842"&gt;@Poley&lt;/a&gt;&amp;nbsp;,&lt;/P&gt;
&lt;P&gt;The steps you've made are fine. I've measured on my board for the SW3. When the button is not pressed, the PT60 is 0V, when the SW3 is pressed, the PT60 is 5V.&lt;/P&gt;
&lt;P&gt;The MCU seems to work on your side because you can connect to the FreeMaster. This is strange, can you please send me the .mot file generated to test it on my board?&lt;/P&gt;
&lt;P&gt;For the last question, I am not sure I understand it. FreeMaster only read/write memory variables/regions. When you use FreeMaster to bring that value on your computer, basically it reads the value and sends it over UART to the Desktop application. The data store memory used, makes the process easier because it writes the button state to a volatile variable that is easier to find in the FreeMaster. MCU should read the button state and sent it to the LED even if you are using or not the FreeMaster.&lt;/P&gt;
&lt;P&gt;Marius&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Mon, 01 Mar 2021 22:40:45 GMT</pubDate>
    <dc:creator>mariuslucianand</dc:creator>
    <dc:date>2021-03-01T22:40:45Z</dc:date>
    <item>
      <title>What am I doing wrong with simple gpio example?</title>
      <link>https://community.nxp.com/t5/Model-Based-Design-Toolbox-MBDT/What-am-I-doing-wrong-with-simple-gpio-example/m-p/1237992#M5822</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;I have tried to run some simple models on my S32K148EVB and it seems that the push buttons do nothing.&lt;/P&gt;&lt;P&gt;My model is setup like shows in one of the tutorials:&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Poley_0-1614607697319.png" style="width: 400px;"&gt;&lt;img src="https://community.nxp.com/t5/image/serverpage/image-id/138350i2CD3A7AEB58CA6BC/image-size/medium?v=v2&amp;amp;px=400" role="button" title="Poley_0-1614607697319.png" alt="Poley_0-1614607697319.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;The light on the board start red and stays red when button is pushed. I have linked to FreeMaster as shown and the button state never actually changes when I press it. Am I doing something obviously wrong?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thank you!&lt;/P&gt;</description>
      <pubDate>Mon, 01 Mar 2021 14:09:29 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Model-Based-Design-Toolbox-MBDT/What-am-I-doing-wrong-with-simple-gpio-example/m-p/1237992#M5822</guid>
      <dc:creator>Poley</dc:creator>
      <dc:date>2021-03-01T14:09:29Z</dc:date>
    </item>
    <item>
      <title>Re: What am I doing wrong with simple gpio example?</title>
      <link>https://community.nxp.com/t5/Model-Based-Design-Toolbox-MBDT/What-am-I-doing-wrong-with-simple-gpio-example/m-p/1238091#M5823</link>
      <description>&lt;P&gt;Have you checked the COMPORT baudrate at device manager is that matched with your Simulink LPUART1 baudrate config?. Also you need to import the generated elf on freemaster "options" -&amp;gt; "map". Please ensure this procedure step is done&lt;/P&gt;</description>
      <pubDate>Mon, 01 Mar 2021 16:51:28 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Model-Based-Design-Toolbox-MBDT/What-am-I-doing-wrong-with-simple-gpio-example/m-p/1238091#M5823</guid>
      <dc:creator>NPXLONG</dc:creator>
      <dc:date>2021-03-01T16:51:28Z</dc:date>
    </item>
    <item>
      <title>Re: What am I doing wrong with simple gpio example?</title>
      <link>https://community.nxp.com/t5/Model-Based-Design-Toolbox-MBDT/What-am-I-doing-wrong-with-simple-gpio-example/m-p/1238127#M5824</link>
      <description>&lt;P&gt;Hi,&amp;nbsp;&lt;/P&gt;&lt;P&gt;All options use the same baudrate and still does not work.&lt;/P&gt;&lt;P&gt;I have the .elf added to FreeMaster but the value never changes from 0.&lt;/P&gt;&lt;P&gt;Thanks&lt;/P&gt;</description>
      <pubDate>Mon, 01 Mar 2021 17:39:02 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Model-Based-Design-Toolbox-MBDT/What-am-I-doing-wrong-with-simple-gpio-example/m-p/1238127#M5824</guid>
      <dc:creator>Poley</dc:creator>
      <dc:date>2021-03-01T17:39:02Z</dc:date>
    </item>
    <item>
      <title>Re: What am I doing wrong with simple gpio example?</title>
      <link>https://community.nxp.com/t5/Model-Based-Design-Toolbox-MBDT/What-am-I-doing-wrong-with-simple-gpio-example/m-p/1238187#M5826</link>
      <description>&lt;P&gt;Hello&amp;nbsp;&lt;a href="https://community.nxp.com/t5/user/viewprofilepage/user-id/183842"&gt;@Poley&lt;/a&gt;&amp;nbsp;,&lt;/P&gt;
&lt;P&gt;The problem might be related to the data variable type of the output port or smth. I've tried with the Data Type Memory and the code seems to work. Another possibility might be the Period in which the freeMaster reads the variable I set 0 basically to read as fast as possible.&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="mariuslucianand_2-1614630954184.png" style="width: 999px;"&gt;&lt;img src="https://community.nxp.com/t5/image/serverpage/image-id/138374i20F1AF111953C833/image-size/large?v=v2&amp;amp;px=999" role="button" title="mariuslucianand_2-1614630954184.png" alt="mariuslucianand_2-1614630954184.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;I have attached the model and FreeMaster example. Can you please give this a try?&lt;/P&gt;
&lt;P&gt;Hope this helps,&lt;/P&gt;
&lt;P&gt;Marius&lt;/P&gt;</description>
      <pubDate>Mon, 01 Mar 2021 20:39:07 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Model-Based-Design-Toolbox-MBDT/What-am-I-doing-wrong-with-simple-gpio-example/m-p/1238187#M5826</guid>
      <dc:creator>mariuslucianand</dc:creator>
      <dc:date>2021-03-01T20:39:07Z</dc:date>
    </item>
    <item>
      <title>Re: What am I doing wrong with simple gpio example?</title>
      <link>https://community.nxp.com/t5/Model-Based-Design-Toolbox-MBDT/What-am-I-doing-wrong-with-simple-gpio-example/m-p/1238213#M5827</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://community.nxp.com/t5/user/viewprofilepage/user-id/72088"&gt;@mariuslucianand&lt;/a&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Unfortunately doesn't work.&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Poley_0-1614636268165.png" style="width: 400px;"&gt;&lt;img src="https://community.nxp.com/t5/image/serverpage/image-id/138376iA28CAA6A92DE15D5/image-size/medium?v=v2&amp;amp;px=400" role="button" title="Poley_0-1614636268165.png" alt="Poley_0-1614636268165.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;Here's what I did:&amp;nbsp;&lt;/P&gt;&lt;P&gt;1. Extracted files to new folder&lt;BR /&gt;2. Build code using embedded coder&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Poley_2-1614636381835.png" style="width: 400px;"&gt;&lt;img src="https://community.nxp.com/t5/image/serverpage/image-id/138378i4F26D16AA6A14960/image-size/medium?v=v2&amp;amp;px=400" role="button" title="Poley_2-1614636381835.png" alt="Poley_2-1614636381835.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;3. Opened FreeMaster 3.1 and loaded the project you linked.&lt;BR /&gt;4. Added the .elf to the map option just in case&lt;BR /&gt;5. Pressed GO, and value doesn't change from 0 when pressed.&amp;nbsp;&lt;/P&gt;&lt;P&gt;When I probe the switch with a multimeter the voltage doesn't seem to change when pressed either. I thought it could be a faulty SW but it doesn't work SW3 or SW4 on the board&lt;/P&gt;&lt;P&gt;Also to use digital inputs in my model do I always have to have it linked to FreeMaster? Can it not work without?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks for the help!&lt;/P&gt;</description>
      <pubDate>Mon, 01 Mar 2021 22:17:21 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Model-Based-Design-Toolbox-MBDT/What-am-I-doing-wrong-with-simple-gpio-example/m-p/1238213#M5827</guid>
      <dc:creator>Poley</dc:creator>
      <dc:date>2021-03-01T22:17:21Z</dc:date>
    </item>
    <item>
      <title>Re: What am I doing wrong with simple gpio example?</title>
      <link>https://community.nxp.com/t5/Model-Based-Design-Toolbox-MBDT/What-am-I-doing-wrong-with-simple-gpio-example/m-p/1238230#M5830</link>
      <description>&lt;P&gt;Hello&amp;nbsp;&lt;a href="https://community.nxp.com/t5/user/viewprofilepage/user-id/183842"&gt;@Poley&lt;/a&gt;&amp;nbsp;,&lt;/P&gt;
&lt;P&gt;The steps you've made are fine. I've measured on my board for the SW3. When the button is not pressed, the PT60 is 0V, when the SW3 is pressed, the PT60 is 5V.&lt;/P&gt;
&lt;P&gt;The MCU seems to work on your side because you can connect to the FreeMaster. This is strange, can you please send me the .mot file generated to test it on my board?&lt;/P&gt;
&lt;P&gt;For the last question, I am not sure I understand it. FreeMaster only read/write memory variables/regions. When you use FreeMaster to bring that value on your computer, basically it reads the value and sends it over UART to the Desktop application. The data store memory used, makes the process easier because it writes the button state to a volatile variable that is easier to find in the FreeMaster. MCU should read the button state and sent it to the LED even if you are using or not the FreeMaster.&lt;/P&gt;
&lt;P&gt;Marius&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 01 Mar 2021 22:40:45 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Model-Based-Design-Toolbox-MBDT/What-am-I-doing-wrong-with-simple-gpio-example/m-p/1238230#M5830</guid>
      <dc:creator>mariuslucianand</dc:creator>
      <dc:date>2021-03-01T22:40:45Z</dc:date>
    </item>
    <item>
      <title>Re: What am I doing wrong with simple gpio example?</title>
      <link>https://community.nxp.com/t5/Model-Based-Design-Toolbox-MBDT/What-am-I-doing-wrong-with-simple-gpio-example/m-p/1238237#M5831</link>
      <description>&lt;P&gt;I have 0v on the left side and 5v on the right if switches are pressed or not.&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Poley_2-1614639128668.png" style="width: 400px;"&gt;&lt;img src="https://community.nxp.com/t5/image/serverpage/image-id/138383i63C682CFC0E8D598/image-size/medium?v=v2&amp;amp;px=400" role="button" title="Poley_2-1614639128668.png" alt="Poley_2-1614639128668.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 01 Mar 2021 22:53:34 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Model-Based-Design-Toolbox-MBDT/What-am-I-doing-wrong-with-simple-gpio-example/m-p/1238237#M5831</guid>
      <dc:creator>Poley</dc:creator>
      <dc:date>2021-03-01T22:53:34Z</dc:date>
    </item>
    <item>
      <title>Re: What am I doing wrong with simple gpio example?</title>
      <link>https://community.nxp.com/t5/Model-Based-Design-Toolbox-MBDT/What-am-I-doing-wrong-with-simple-gpio-example/m-p/1238505#M5832</link>
      <description>&lt;P&gt;Hello&amp;nbsp;&lt;a href="https://community.nxp.com/t5/user/viewprofilepage/user-id/183842"&gt;@Poley&lt;/a&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I've tried your example and it works on my board by pressing the SW4, not SW3 as the one in your attached picture.&lt;/P&gt;
&lt;P&gt;Let's try to bypass the switch button and put 5V to the output. You can use a write connected to the 5V, as in the attached image below, and TP61(SW4). On my setup, this turned the LED on GREEN&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="mariuslucianand_0-1614670676766.png" style="width: 999px;"&gt;&lt;img src="https://community.nxp.com/t5/image/serverpage/image-id/138449iF42BAC84913093C8/image-size/large?v=v2&amp;amp;px=999" role="button" title="mariuslucianand_0-1614670676766.png" alt="mariuslucianand_0-1614670676766.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;On my setup, the logic seems to be reversed. Normally the LED is turned off, while the button is pressed the LED is lighting up. Curios.&lt;/P&gt;
&lt;P&gt;Hope this helps,&lt;/P&gt;
&lt;P&gt;Marius&lt;/P&gt;</description>
      <pubDate>Tue, 02 Mar 2021 07:46:26 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Model-Based-Design-Toolbox-MBDT/What-am-I-doing-wrong-with-simple-gpio-example/m-p/1238505#M5832</guid>
      <dc:creator>mariuslucianand</dc:creator>
      <dc:date>2021-03-02T07:46:26Z</dc:date>
    </item>
    <item>
      <title>Re: What am I doing wrong with simple gpio example?</title>
      <link>https://community.nxp.com/t5/Model-Based-Design-Toolbox-MBDT/What-am-I-doing-wrong-with-simple-gpio-example/m-p/1238576#M5833</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://community.nxp.com/t5/user/viewprofilepage/user-id/72088"&gt;@mariuslucianand&lt;/a&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Bypassing the switch works:&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Poley_0-1614675968465.png" style="width: 400px;"&gt;&lt;img src="https://community.nxp.com/t5/image/serverpage/image-id/138457i36E86C1F875F955E/image-size/medium?v=v2&amp;amp;px=400" role="button" title="Poley_0-1614675968465.png" alt="Poley_0-1614675968465.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;I have noticed that when probing the switches I does a tiny amount. It is dead on 0v before pressed and then 6mV when pressed. Could I have faulty switches?&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Poley_1-1614676080032.png" style="width: 400px;"&gt;&lt;img src="https://community.nxp.com/t5/image/serverpage/image-id/138458i9EDAFB03CFB4261B/image-size/medium?v=v2&amp;amp;px=400" role="button" title="Poley_1-1614676080032.png" alt="Poley_1-1614676080032.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 02 Mar 2021 09:13:14 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Model-Based-Design-Toolbox-MBDT/What-am-I-doing-wrong-with-simple-gpio-example/m-p/1238576#M5833</guid>
      <dc:creator>Poley</dc:creator>
      <dc:date>2021-03-02T09:13:14Z</dc:date>
    </item>
    <item>
      <title>Re: What am I doing wrong with simple gpio example?</title>
      <link>https://community.nxp.com/t5/Model-Based-Design-Toolbox-MBDT/What-am-I-doing-wrong-with-simple-gpio-example/m-p/1238656#M5835</link>
      <description>&lt;P&gt;Hello&amp;nbsp;&lt;a href="https://community.nxp.com/t5/user/viewprofilepage/user-id/183842"&gt;@Poley&lt;/a&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;There might be an issue either with the button or either with the filter circuitry. I don't know.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="mariuslucianand_0-1614683435679.png" style="width: 400px;"&gt;&lt;img src="https://community.nxp.com/t5/image/serverpage/image-id/138468i0B3A363E1BC1A4E7/image-size/medium?v=v2&amp;amp;px=400" role="button" title="mariuslucianand_0-1614683435679.png" alt="mariuslucianand_0-1614683435679.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;Both of the buttons behave the same?&lt;/P&gt;
&lt;P&gt;Marius&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 02 Mar 2021 11:11:28 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Model-Based-Design-Toolbox-MBDT/What-am-I-doing-wrong-with-simple-gpio-example/m-p/1238656#M5835</guid>
      <dc:creator>mariuslucianand</dc:creator>
      <dc:date>2021-03-02T11:11:28Z</dc:date>
    </item>
    <item>
      <title>Re: What am I doing wrong with simple gpio example?</title>
      <link>https://community.nxp.com/t5/Model-Based-Design-Toolbox-MBDT/What-am-I-doing-wrong-with-simple-gpio-example/m-p/1238657#M5836</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://community.nxp.com/t5/user/viewprofilepage/user-id/72088"&gt;@mariuslucianand&lt;/a&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Yes both buttons do exactly the same&lt;/P&gt;</description>
      <pubDate>Tue, 02 Mar 2021 11:13:39 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Model-Based-Design-Toolbox-MBDT/What-am-I-doing-wrong-with-simple-gpio-example/m-p/1238657#M5836</guid>
      <dc:creator>Poley</dc:creator>
      <dc:date>2021-03-02T11:13:39Z</dc:date>
    </item>
    <item>
      <title>Re: What am I doing wrong with simple gpio example?</title>
      <link>https://community.nxp.com/t5/Model-Based-Design-Toolbox-MBDT/What-am-I-doing-wrong-with-simple-gpio-example/m-p/1238716#M5839</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://community.nxp.com/t5/user/viewprofilepage/user-id/183842"&gt;@Poley&lt;/a&gt;&amp;nbsp;,&lt;/P&gt;&lt;P&gt;I would suggested that you should try to build your own pull down button circuit to try this GPIO example&amp;nbsp;&lt;/P&gt;&lt;P&gt;or else try out the ADC example to ensure your freemaster working properly as expected.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Regards&lt;/P&gt;</description>
      <pubDate>Tue, 02 Mar 2021 13:29:41 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Model-Based-Design-Toolbox-MBDT/What-am-I-doing-wrong-with-simple-gpio-example/m-p/1238716#M5839</guid>
      <dc:creator>NPXLONG</dc:creator>
      <dc:date>2021-03-02T13:29:41Z</dc:date>
    </item>
    <item>
      <title>Re: What am I doing wrong with simple gpio example?</title>
      <link>https://community.nxp.com/t5/Model-Based-Design-Toolbox-MBDT/What-am-I-doing-wrong-with-simple-gpio-example/m-p/1238720#M5840</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://community.nxp.com/t5/user/viewprofilepage/user-id/180634"&gt;@NPXLONG&lt;/a&gt;&amp;nbsp;&lt;BR /&gt;&lt;BR /&gt;What do you mean sorry?&lt;BR /&gt;&lt;BR /&gt;Also ADC works:&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Poley_0-1614693080102.png" style="width: 400px;"&gt;&lt;img src="https://community.nxp.com/t5/image/serverpage/image-id/138485i086A621706A0C51A/image-size/medium?v=v2&amp;amp;px=400" role="button" title="Poley_0-1614693080102.png" alt="Poley_0-1614693080102.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 02 Mar 2021 13:51:34 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Model-Based-Design-Toolbox-MBDT/What-am-I-doing-wrong-with-simple-gpio-example/m-p/1238720#M5840</guid>
      <dc:creator>Poley</dc:creator>
      <dc:date>2021-03-02T13:51:34Z</dc:date>
    </item>
  </channel>
</rss>

