<?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: Change GPIO active state to low? in i.MX Processors</title>
    <link>https://community.nxp.com/t5/i-MX-Processors/Change-GPIO-active-state-to-low/m-p/1389847#M184767</link>
    <description>&lt;P&gt;Hi Ed&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;for gpio control may be useful below :&lt;/P&gt;
&lt;P&gt;&lt;A href="https://community.nxp.com/t5/i-MX-Processors/how-does-it-control-the-GPIO-as-input-output-in-DTS/td-p/1319972" target="_blank"&gt;https://community.nxp.com/t5/i-MX-Processors/how-does-it-control-the-GPIO-as-input-output-in-DTS/td-p/1319972&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Best regards&lt;BR /&gt;igor&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Tue, 21 Dec 2021 06:02:50 GMT</pubDate>
    <dc:creator>igorpadykov</dc:creator>
    <dc:date>2021-12-21T06:02:50Z</dc:date>
    <item>
      <title>Change GPIO active state to low?</title>
      <link>https://community.nxp.com/t5/i-MX-Processors/Change-GPIO-active-state-to-low/m-p/1389798#M184760</link>
      <description>&lt;P&gt;Okay so I have i.imx8m mini, and the gpiod commands seem to work, however, the command:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="c"&gt;sudo gpioget --active-low /dev/gpiochip2 6&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;Doesn't change the voltage on the pin.&lt;/P&gt;&lt;P&gt;When I run:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="c"&gt;sudo gpioset /dev/gpiochip2 6=0&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;It does change the pin voltage to low, however, if I try to read the value:&lt;/P&gt;&lt;LI-CODE lang="c"&gt;sudo gpioget 2 6&lt;/LI-CODE&gt;&lt;P&gt;It returns "1" and sets the pin voltage to high&lt;/P&gt;&lt;LI-CODE lang="c"&gt;sudo gpioinfo gpiochip2&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;Shows all pins as "active-high"&lt;/P&gt;&lt;P&gt;Is it possible to change any of the pins to "active-low"? Or are they hardwired that way in hardware? E.g. have pull up resistors to 3.3V.&lt;/P&gt;</description>
      <pubDate>Tue, 21 Dec 2021 04:05:10 GMT</pubDate>
      <guid>https://community.nxp.com/t5/i-MX-Processors/Change-GPIO-active-state-to-low/m-p/1389798#M184760</guid>
      <dc:creator>triedgetech</dc:creator>
      <dc:date>2021-12-21T04:05:10Z</dc:date>
    </item>
    <item>
      <title>Re: Change GPIO active state to low?</title>
      <link>https://community.nxp.com/t5/i-MX-Processors/Change-GPIO-active-state-to-low/m-p/1389813#M184762</link>
      <description>&lt;P&gt;you can run "gpioset -h"&lt;/P&gt;&lt;P&gt;remind read "Note" sections or &lt;A href="https://github.com/brgl/libgpiod/blob/master/tools/gpioset.c#L69" target="_self"&gt;read this&lt;/A&gt;&lt;/P&gt;</description>
      <pubDate>Tue, 21 Dec 2021 04:54:26 GMT</pubDate>
      <guid>https://community.nxp.com/t5/i-MX-Processors/Change-GPIO-active-state-to-low/m-p/1389813#M184762</guid>
      <dc:creator>kunyichen</dc:creator>
      <dc:date>2021-12-21T04:54:26Z</dc:date>
    </item>
    <item>
      <title>Re: Change GPIO active state to low?</title>
      <link>https://community.nxp.com/t5/i-MX-Processors/Change-GPIO-active-state-to-low/m-p/1389847#M184767</link>
      <description>&lt;P&gt;Hi Ed&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;for gpio control may be useful below :&lt;/P&gt;
&lt;P&gt;&lt;A href="https://community.nxp.com/t5/i-MX-Processors/how-does-it-control-the-GPIO-as-input-output-in-DTS/td-p/1319972" target="_blank"&gt;https://community.nxp.com/t5/i-MX-Processors/how-does-it-control-the-GPIO-as-input-output-in-DTS/td-p/1319972&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Best regards&lt;BR /&gt;igor&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 21 Dec 2021 06:02:50 GMT</pubDate>
      <guid>https://community.nxp.com/t5/i-MX-Processors/Change-GPIO-active-state-to-low/m-p/1389847#M184767</guid>
      <dc:creator>igorpadykov</dc:creator>
      <dc:date>2021-12-21T06:02:50Z</dc:date>
    </item>
    <item>
      <title>Re: Change GPIO active state to low?</title>
      <link>https://community.nxp.com/t5/i-MX-Processors/Change-GPIO-active-state-to-low/m-p/1452545#M189964</link>
      <description>&lt;P&gt;let's say I want to change state of GPIO3_IO0, which is described in device tree within node iomuxc&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="c"&gt;pinctrl_gpio3: gpio3grp {
fsl,pins = &amp;lt;
			MX8MM_IOMUXC_NAND_ALE_GPIO3_IO0 0x41

// ...
&amp;gt;;
	};&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Now I'm a bit confused, does the value 0x41 set in "&lt;SPAN&gt;General Purpose Register 3 (IOMUXC_GPR_GPR3)&lt;/SPAN&gt;"&lt;/P&gt;&lt;P&gt;or simply &lt;SPAN&gt;IOMUXC&lt;/SPAN&gt; pad features (&lt;SPAN&gt;8.2.3.1&lt;/SPAN&gt; &lt;SPAN&gt;GPIO pad features / Pad Control Register&lt;/SPAN&gt;)? So &lt;SPAN&gt;parameter value &lt;/SPAN&gt;0x41 (01000001) would change:&lt;/P&gt;&lt;P&gt;PE (&lt;SPAN&gt;Pull Resistors Enable Field&lt;/SPAN&gt;)&lt;/P&gt;&lt;P&gt;HYS (&lt;SPAN&gt;Hysteresis Enable Field&lt;/SPAN&gt;)&lt;/P&gt;&lt;P&gt;PUE (&lt;SPAN&gt;Control IO ports PS&lt;/SPAN&gt;)&lt;/P&gt;&lt;P&gt;ODE (&lt;SPAN&gt;Control the IO ports ODE&lt;/SPAN&gt;)&lt;/P&gt;&lt;P&gt;FSEL (&lt;SPAN&gt;Slew Rate Field&lt;/SPAN&gt;)&lt;/P&gt;&lt;P&gt;DSE (&lt;SPAN&gt;Drive Strength Field&lt;/SPAN&gt;)&lt;/P&gt;&lt;P&gt;?&lt;/P&gt;&lt;P&gt;A value of 0x41, which is in binary&amp;nbsp;0 1 0 00 001, means PE =&amp;gt; Disabled, HYS =&amp;gt; CMOS input, PUE =&amp;gt; Enabled, &lt;SPAN&gt;ODE&lt;/SPAN&gt; =&amp;gt; Disabled, &lt;SPAN&gt;FSEL&lt;/SPAN&gt; =&amp;gt; SLOW, DSE =&amp;gt; X1&lt;/P&gt;&lt;P&gt;Correct?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;How do I set state of signal GPIO3_IO0 to be in active-low by default? Set "PUE" bit in PAD control register to 0? By default, all my detected gpios:&lt;/P&gt;&lt;P&gt;sudo gpioinfo gpiochip2&lt;/P&gt;&lt;P&gt;show up as "active-high"&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;In &lt;A href="https://community.nxp.com/pwmxy87654/attachments/pwmxy87654/imx-processors%40tkb/2520/1/Accessing_GPIO_From_UserSpace.pdf" target="_self"&gt;these NXP slides&lt;/A&gt;, it's only shown how to do it in userspace using a deprecated method.&lt;/P&gt;&lt;P&gt;How do I do change GPIO's state in userspace using libgpiod library?&lt;/P&gt;</description>
      <pubDate>Wed, 04 May 2022 06:54:20 GMT</pubDate>
      <guid>https://community.nxp.com/t5/i-MX-Processors/Change-GPIO-active-state-to-low/m-p/1452545#M189964</guid>
      <dc:creator>triedgetech</dc:creator>
      <dc:date>2022-05-04T06:54:20Z</dc:date>
    </item>
  </channel>
</rss>

