<?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>MPC5xxxのトピックRe: How to Use User Switch on DEVKIT-MPC5748G?</title>
    <link>https://community.nxp.com/t5/MPC5xxx/How-to-Use-User-Switch-on-DEVKIT-MPC5748G/m-p/1260517#M17954</link>
    <description>&lt;P&gt;Hi,&lt;/P&gt;
&lt;P&gt;I guessed this was discussed in this thread.&lt;BR /&gt;For example add below code to the simple "hello_Z4_1" example&lt;/P&gt;
&lt;P&gt;SIUL2.MSCR[PA10].B.OBE = 1; /* Pad PA10 (10): OBE=1. On EVB active low DS4 LED */&lt;BR /&gt;SIUL2.MSCR[PA3].B.IBE = 1; /* Pad PA3 (3): IBE=1. On EVB switch SW4 */&lt;/P&gt;
&lt;P&gt;while(1)&lt;BR /&gt;{&lt;BR /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp;if(SIUL2.GPDI[PA3].R) // PA3 high / SW4 pressed&lt;BR /&gt;&amp;nbsp; &amp;nbsp; {&lt;BR /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;SIUL2.GPDO[PA10].R = 0;//LED ON&lt;BR /&gt;&amp;nbsp; &amp;nbsp; }&lt;BR /&gt;&amp;nbsp; &amp;nbsp; else //PA3 low / SW4 released&lt;BR /&gt;&amp;nbsp; &amp;nbsp; {&lt;BR /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;SIUL2.GPDO[PA10].R = 1;//LED OFF&lt;BR /&gt;&amp;nbsp; &amp;nbsp; }&lt;BR /&gt;}&lt;/P&gt;
&lt;P&gt;BR, Petr&lt;/P&gt;</description>
    <pubDate>Mon, 12 Apr 2021 11:06:08 GMT</pubDate>
    <dc:creator>PetrS</dc:creator>
    <dc:date>2021-04-12T11:06:08Z</dc:date>
    <item>
      <title>How to Use User Switch on DEVKIT-MPC5748G?</title>
      <link>https://community.nxp.com/t5/MPC5xxx/How-to-Use-User-Switch-on-DEVKIT-MPC5748G/m-p/1245557#M17662</link>
      <description>Hi, I am trying to familiarize myself with the DEVKIT-MPC5748G. So far I have been able to turn on a user LED. Now I want to control the LED (on and off) with a user switch. I have activated for example the PORT PA3 connected to the User Switch4 as input already. But how do I set the condition "If User Switch4 is pressed then the LED lights up and otherwise the LED stays off"?) Thanks</description>
      <pubDate>Mon, 15 Mar 2021 08:59:29 GMT</pubDate>
      <guid>https://community.nxp.com/t5/MPC5xxx/How-to-Use-User-Switch-on-DEVKIT-MPC5748G/m-p/1245557#M17662</guid>
      <dc:creator>Elsa_24</dc:creator>
      <dc:date>2021-03-15T08:59:29Z</dc:date>
    </item>
    <item>
      <title>Re: How to Use User Switch on DEVKIT-MPC5748G?</title>
      <link>https://community.nxp.com/t5/MPC5xxx/How-to-Use-User-Switch-on-DEVKIT-MPC5748G/m-p/1245613#M17669</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;
&lt;P&gt;if(SIUL2.GPDI[3].R) // PA3 high / SW4 pressed&lt;BR /&gt;{&lt;BR /&gt;&amp;nbsp; &amp;nbsp;//LED ON&lt;BR /&gt;}&lt;BR /&gt;else&amp;nbsp; &amp;nbsp;/PA3 low / SW4 released&lt;BR /&gt;{&lt;/P&gt;
&lt;P&gt;&amp;nbsp; &amp;nbsp;//LED OFF&lt;BR /&gt;}&lt;/P&gt;
&lt;P&gt;BR, Petr&lt;/P&gt;</description>
      <pubDate>Mon, 15 Mar 2021 09:50:20 GMT</pubDate>
      <guid>https://community.nxp.com/t5/MPC5xxx/How-to-Use-User-Switch-on-DEVKIT-MPC5748G/m-p/1245613#M17669</guid>
      <dc:creator>PetrS</dc:creator>
      <dc:date>2021-03-15T09:50:20Z</dc:date>
    </item>
    <item>
      <title>Re: How to Use User Switch on DEVKIT-MPC5748G?</title>
      <link>https://community.nxp.com/t5/MPC5xxx/How-to-Use-User-Switch-on-DEVKIT-MPC5748G/m-p/1245655#M17675</link>
      <description>&lt;P&gt;Hi PetrS,&lt;/P&gt;&lt;P&gt;Thanks for your answer.&lt;/P&gt;&lt;P&gt;I tried to do as you suggested but I got an error in the if condition:&lt;/P&gt;&lt;P&gt;&amp;lt;&amp;lt;request for member 'GPDI' in something not a structure or union&amp;gt;&amp;gt;&lt;/P&gt;&lt;P&gt;how to solve the problem?&lt;/P&gt;&lt;P&gt;Here is the corresponding part of my code. The erector signals at the level of the condition in the if&lt;/P&gt;&lt;P&gt;if(SIUL2.GPDI[3].R)&lt;BR /&gt;{&lt;BR /&gt;PINS_DRV_WritePin(PTA, 10, 1);&lt;BR /&gt;}&lt;BR /&gt;else&lt;BR /&gt;{&lt;BR /&gt;PINS_DRV_WritePin(PTA, 10, 0);&lt;/P&gt;&lt;P&gt;}&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;PS: I have activated PORT PA3 in SIUL2 as an input already. it corresponds to GPIO 3&lt;/P&gt;</description>
      <pubDate>Mon, 15 Mar 2021 10:42:44 GMT</pubDate>
      <guid>https://community.nxp.com/t5/MPC5xxx/How-to-Use-User-Switch-on-DEVKIT-MPC5748G/m-p/1245655#M17675</guid>
      <dc:creator>Elsa_24</dc:creator>
      <dc:date>2021-03-15T10:42:44Z</dc:date>
    </item>
    <item>
      <title>Re: How to Use User Switch on DEVKIT-MPC5748G?</title>
      <link>https://community.nxp.com/t5/MPC5xxx/How-to-Use-User-Switch-on-DEVKIT-MPC5748G/m-p/1245668#M17678</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;
&lt;P&gt;check how registers are defined in the device header file.&lt;BR /&gt;Under SDK you can use&amp;nbsp;&lt;SPAN&gt;PINS_DRV_ReadPins function.&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;The usage should be&lt;/SPAN&gt;&lt;BR clear="none" /&gt;&lt;SPAN&gt;pin_value = ((uint16_t)(1&amp;lt;&amp;lt;(pin))&amp;amp;PINS_DRV_ReadPins(port))&amp;gt;&amp;gt;(pin);&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;In your code you can can have e.g.&lt;/P&gt;
&lt;P&gt;if(&lt;SPAN&gt;(uint16_t)(1&amp;lt;&amp;lt;(3))&amp;amp;PINS_DRV_ReadPins(PTA))&lt;BR /&gt;&lt;/SPAN&gt;{&lt;BR /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp;PINS_DRV_WritePin(PTA, 10, 1);&lt;BR /&gt;}&lt;BR /&gt;else&lt;BR /&gt;{&lt;BR /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp;PINS_DRV_WritePin(PTA, 10, 0);&lt;BR /&gt;}&lt;/P&gt;
&lt;P&gt;BR, Petr&lt;/P&gt;</description>
      <pubDate>Mon, 15 Mar 2021 11:08:11 GMT</pubDate>
      <guid>https://community.nxp.com/t5/MPC5xxx/How-to-Use-User-Switch-on-DEVKIT-MPC5748G/m-p/1245668#M17678</guid>
      <dc:creator>PetrS</dc:creator>
      <dc:date>2021-03-15T11:08:11Z</dc:date>
    </item>
    <item>
      <title>Re: How to Use User Switch on DEVKIT-MPC5748G?</title>
      <link>https://community.nxp.com/t5/MPC5xxx/How-to-Use-User-Switch-on-DEVKIT-MPC5748G/m-p/1250857#M17797</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://community.nxp.com/t5/user/viewprofilepage/user-id/52961"&gt;@PetrS&lt;/a&gt;&amp;nbsp;,&lt;/P&gt;&lt;P&gt;I am&amp;nbsp; also getting same error in if loop. "Request for member 'GPDI' in something not a structure or union", I have enclosed the project.&amp;nbsp;&lt;/P&gt;&lt;P&gt;Please tell me how to resolve the error.&lt;/P&gt;&lt;P&gt;Thanks&lt;/P&gt;&lt;P&gt;&lt;EM&gt;Krishnaja.&lt;/EM&gt;&lt;/P&gt;</description>
      <pubDate>Wed, 24 Mar 2021 04:36:10 GMT</pubDate>
      <guid>https://community.nxp.com/t5/MPC5xxx/How-to-Use-User-Switch-on-DEVKIT-MPC5748G/m-p/1250857#M17797</guid>
      <dc:creator>Krishnaja</dc:creator>
      <dc:date>2021-03-24T04:36:10Z</dc:date>
    </item>
    <item>
      <title>Re: How to Use User Switch on DEVKIT-MPC5748G?</title>
      <link>https://community.nxp.com/t5/MPC5xxx/How-to-Use-User-Switch-on-DEVKIT-MPC5748G/m-p/1252408#M17833</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;
&lt;P&gt;did you read my latest post?&amp;nbsp;&lt;BR /&gt;Either use driver function&lt;BR /&gt;if((uint16_t)(1&amp;lt;&amp;lt;(3))&amp;amp;PINS_DRV_ReadPins(PTA))&lt;BR /&gt;or according header file use&amp;nbsp;&lt;BR /&gt;if(SIUL2-&amp;gt;GPDI[3])&lt;/P&gt;
&lt;P&gt;BR, Petr&lt;/P&gt;</description>
      <pubDate>Thu, 25 Mar 2021 21:23:18 GMT</pubDate>
      <guid>https://community.nxp.com/t5/MPC5xxx/How-to-Use-User-Switch-on-DEVKIT-MPC5748G/m-p/1252408#M17833</guid>
      <dc:creator>PetrS</dc:creator>
      <dc:date>2021-03-25T21:23:18Z</dc:date>
    </item>
    <item>
      <title>Re: How to Use User Switch on DEVKIT-MPC5748G?</title>
      <link>https://community.nxp.com/t5/MPC5xxx/How-to-Use-User-Switch-on-DEVKIT-MPC5748G/m-p/1259626#M17936</link>
      <description>&lt;P&gt;Hi I am trying to write a program &lt;SPAN&gt;&amp;nbsp;to control the LED (on and off) with a user switch. If I press the switch the LED must ON and otherwise it remains OFF.(by using MPC5748G&amp;nbsp;&lt;/SPAN&gt;controller)&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;can any one tell me how to write program for that ?&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Fri, 09 Apr 2021 10:48:52 GMT</pubDate>
      <guid>https://community.nxp.com/t5/MPC5xxx/How-to-Use-User-Switch-on-DEVKIT-MPC5748G/m-p/1259626#M17936</guid>
      <dc:creator>polisetty</dc:creator>
      <dc:date>2021-04-09T10:48:52Z</dc:date>
    </item>
    <item>
      <title>Re: How to Use User Switch on DEVKIT-MPC5748G?</title>
      <link>https://community.nxp.com/t5/MPC5xxx/How-to-Use-User-Switch-on-DEVKIT-MPC5748G/m-p/1260517#M17954</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;
&lt;P&gt;I guessed this was discussed in this thread.&lt;BR /&gt;For example add below code to the simple "hello_Z4_1" example&lt;/P&gt;
&lt;P&gt;SIUL2.MSCR[PA10].B.OBE = 1; /* Pad PA10 (10): OBE=1. On EVB active low DS4 LED */&lt;BR /&gt;SIUL2.MSCR[PA3].B.IBE = 1; /* Pad PA3 (3): IBE=1. On EVB switch SW4 */&lt;/P&gt;
&lt;P&gt;while(1)&lt;BR /&gt;{&lt;BR /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp;if(SIUL2.GPDI[PA3].R) // PA3 high / SW4 pressed&lt;BR /&gt;&amp;nbsp; &amp;nbsp; {&lt;BR /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;SIUL2.GPDO[PA10].R = 0;//LED ON&lt;BR /&gt;&amp;nbsp; &amp;nbsp; }&lt;BR /&gt;&amp;nbsp; &amp;nbsp; else //PA3 low / SW4 released&lt;BR /&gt;&amp;nbsp; &amp;nbsp; {&lt;BR /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;SIUL2.GPDO[PA10].R = 1;//LED OFF&lt;BR /&gt;&amp;nbsp; &amp;nbsp; }&lt;BR /&gt;}&lt;/P&gt;
&lt;P&gt;BR, Petr&lt;/P&gt;</description>
      <pubDate>Mon, 12 Apr 2021 11:06:08 GMT</pubDate>
      <guid>https://community.nxp.com/t5/MPC5xxx/How-to-Use-User-Switch-on-DEVKIT-MPC5748G/m-p/1260517#M17954</guid>
      <dc:creator>PetrS</dc:creator>
      <dc:date>2021-04-12T11:06:08Z</dc:date>
    </item>
  </channel>
</rss>

