<?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>i.MX ProcessorsのトピックConnect GPIO on IMX7ULP evk</title>
    <link>https://community.nxp.com/t5/i-MX-Processors/Connect-GPIO-on-IMX7ULP-evk/m-p/1565148#M198399</link>
    <description>&lt;P&gt;Hello,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I need some explanation for driving a button knob on my IMX7ULP evk.&lt;/P&gt;&lt;P&gt;What i've tried:&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Adding to custom dts:&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;    gpio-keys {
		compatible = "gpio-keys";
		autorepeat;

		enter {
			label = "GPIO Key Enter";
			linux,code = &amp;lt;KEY_ENTER&amp;gt;;
			gpios = &amp;lt;&amp;amp;gpio_ptf 9 GPIO_ACTIVE_HIGH&amp;gt;;
		};
    };&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Added to imx7ulp-evk.dts&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;	pinctrl_enter: enter_grp {
		fsl,pins = &amp;lt;
			IMX7ULP_PAD_PTF9__PTF9        0x0b0b0 
		&amp;gt;;
	};&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;The button is connected from GND &amp;amp; Target(D10 arduino header == PTF9)&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;Evtest shows me that the event is available, so the probing is completed. But when i hit the button nothing happens. I assume it has something to do with pull-up input that the button requires. But it never triggers.&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;When i change:&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;GPIO_ACTIVE_HIGH -&amp;gt; GPIO_ACTIVE_LOW&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;It keeps spamming the enter key. And i can't abort it.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;How do i handle GPIO input buttons correctly with IMX7?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Tue, 06 Dec 2022 11:15:09 GMT</pubDate>
    <dc:creator>LegoBox</dc:creator>
    <dc:date>2022-12-06T11:15:09Z</dc:date>
    <item>
      <title>Connect GPIO on IMX7ULP evk</title>
      <link>https://community.nxp.com/t5/i-MX-Processors/Connect-GPIO-on-IMX7ULP-evk/m-p/1565148#M198399</link>
      <description>&lt;P&gt;Hello,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I need some explanation for driving a button knob on my IMX7ULP evk.&lt;/P&gt;&lt;P&gt;What i've tried:&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Adding to custom dts:&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;    gpio-keys {
		compatible = "gpio-keys";
		autorepeat;

		enter {
			label = "GPIO Key Enter";
			linux,code = &amp;lt;KEY_ENTER&amp;gt;;
			gpios = &amp;lt;&amp;amp;gpio_ptf 9 GPIO_ACTIVE_HIGH&amp;gt;;
		};
    };&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Added to imx7ulp-evk.dts&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;	pinctrl_enter: enter_grp {
		fsl,pins = &amp;lt;
			IMX7ULP_PAD_PTF9__PTF9        0x0b0b0 
		&amp;gt;;
	};&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;The button is connected from GND &amp;amp; Target(D10 arduino header == PTF9)&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;Evtest shows me that the event is available, so the probing is completed. But when i hit the button nothing happens. I assume it has something to do with pull-up input that the button requires. But it never triggers.&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;When i change:&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;GPIO_ACTIVE_HIGH -&amp;gt; GPIO_ACTIVE_LOW&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;It keeps spamming the enter key. And i can't abort it.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;How do i handle GPIO input buttons correctly with IMX7?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 06 Dec 2022 11:15:09 GMT</pubDate>
      <guid>https://community.nxp.com/t5/i-MX-Processors/Connect-GPIO-on-IMX7ULP-evk/m-p/1565148#M198399</guid>
      <dc:creator>LegoBox</dc:creator>
      <dc:date>2022-12-06T11:15:09Z</dc:date>
    </item>
    <item>
      <title>Re: Connect GPIO on IMX7ULP evk</title>
      <link>https://community.nxp.com/t5/i-MX-Processors/Connect-GPIO-on-IMX7ULP-evk/m-p/1565850#M198441</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://community.nxp.com/t5/user/viewprofilepage/user-id/207742"&gt;@LegoBox&lt;/a&gt;,&lt;/P&gt;&lt;P&gt;You may need to break the problem down, first confirm you have the correct pin and GPIO number. It's probably fine but GPIO numbers can catch anyone out. Make the GPIO pin toggle or read back from it first then once that's confirmed readdress your interrupt issue. Reading back from the pin will also confirm if you need a pullup etc.&amp;nbsp;&lt;/P&gt;&lt;P&gt;Depending on your kernel you may have /&lt;SPAN&gt;sys/class/gpio available, this method is being deprecated in favour of the gpiod method for newer kernels. If you have the /sys/class/gpio ABI then make sure the pin has not been used in the device tree.&amp;nbsp;&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;&lt;A href="https://www.kernel.org/doc/Documentation/gpio/sysfs.txt" target="_blank"&gt;https://www.kernel.org/doc/Documentation/gpio/sysfs.txt&lt;/A&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;Quote "Export the pin:&amp;nbsp;&amp;nbsp;Example: "echo 19 &amp;gt; export" will create a "gpio19" node&lt;BR /&gt;for GPIO #19, if that's not requested by kernel code."&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;Set and use GPIO5 (in userspace / terminal)&lt;/P&gt;&lt;P&gt;echo 5 &amp;gt; /sys/class/gpio/export&lt;BR /&gt;echo "out" &amp;gt; /sys/class/gpio/gpio5/direction&lt;BR /&gt;echo 1 &amp;gt; /sys/class/gpio/gpio5/value&amp;nbsp; &amp;nbsp;// set pin high&lt;/P&gt;&lt;P&gt;Read from GPIO84&lt;/P&gt;&lt;P&gt;echo 84 &amp;gt; /sys/class/gpio/export&lt;BR /&gt;echo in &amp;gt; /sys/class/gpio/gpio84/direction&lt;BR /&gt;cat /sys/class/gpio/gpio84/value&amp;nbsp; &amp;nbsp;&amp;nbsp; // Read the pin&lt;/P&gt;&lt;P&gt;Hope it helps.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 07 Dec 2022 10:05:51 GMT</pubDate>
      <guid>https://community.nxp.com/t5/i-MX-Processors/Connect-GPIO-on-IMX7ULP-evk/m-p/1565850#M198441</guid>
      <dc:creator>edwardtyrrell</dc:creator>
      <dc:date>2022-12-07T10:05:51Z</dc:date>
    </item>
    <item>
      <title>Re: Connect GPIO on IMX7ULP evk</title>
      <link>https://community.nxp.com/t5/i-MX-Processors/Connect-GPIO-on-IMX7ULP-evk/m-p/1565903#M198449</link>
      <description>&lt;P&gt;Hi &lt;a href="https://community.nxp.com/t5/user/viewprofilepage/user-id/207742"&gt;@LegoBox&lt;/a&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I hope you are doing well.&lt;/P&gt;
&lt;P&gt;It seems input voltage of the mentioned GPIO is not accurate and doesn't match the VIH and VIL levels of the processor.&lt;/P&gt;
&lt;P&gt;Can you please measure the input voltage on GPIO pin with both the changes GPIO_ACTIVE_HIGH and GPIO_ACTIVE_LOW? Please share the results here.&lt;/P&gt;
&lt;P&gt;Can you please share the schematic&amp;nbsp; connection between button and processor?&lt;/P&gt;
&lt;P&gt;Thanks &amp;amp; Regards&lt;/P&gt;
&lt;P&gt;Sanket Parekh&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 07 Dec 2022 12:04:18 GMT</pubDate>
      <guid>https://community.nxp.com/t5/i-MX-Processors/Connect-GPIO-on-IMX7ULP-evk/m-p/1565903#M198449</guid>
      <dc:creator>Sanket_Parekh</dc:creator>
      <dc:date>2022-12-07T12:04:18Z</dc:date>
    </item>
    <item>
      <title>Re: Connect GPIO on IMX7ULP evk</title>
      <link>https://community.nxp.com/t5/i-MX-Processors/Connect-GPIO-on-IMX7ULP-evk/m-p/1567489#M198569</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://community.nxp.com/t5/user/viewprofilepage/user-id/207742"&gt;@LegoBox&lt;/a&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Waiting for your answer.&lt;/P&gt;
&lt;P&gt;Thanks &amp;amp; Regards&lt;/P&gt;
&lt;P&gt;Sanket Parekh&lt;/P&gt;</description>
      <pubDate>Fri, 09 Dec 2022 12:10:28 GMT</pubDate>
      <guid>https://community.nxp.com/t5/i-MX-Processors/Connect-GPIO-on-IMX7ULP-evk/m-p/1567489#M198569</guid>
      <dc:creator>Sanket_Parekh</dc:creator>
      <dc:date>2022-12-09T12:10:28Z</dc:date>
    </item>
  </channel>
</rss>

