<?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: Cannot set GPIO state with 'gpio_direction_output' in Layerscape</title>
    <link>https://community.nxp.com/t5/Layerscape/Cannot-set-GPIO-state-with-gpio-direction-output/m-p/1622100#M12093</link>
    <description>&lt;P style="margin: 0in; font-family: Calibri; font-size: 11.0pt;" lang="en-US"&gt;Please share the MPU and SDK information&lt;/P&gt;</description>
    <pubDate>Mon, 27 Mar 2023 01:00:21 GMT</pubDate>
    <dc:creator>June_Lu</dc:creator>
    <dc:date>2023-03-27T01:00:21Z</dc:date>
    <item>
      <title>Cannot set GPIO state with 'gpio_direction_output'</title>
      <link>https://community.nxp.com/t5/Layerscape/Cannot-set-GPIO-state-with-gpio-direction-output/m-p/1622054#M12090</link>
      <description>&lt;P&gt;Hello. I try to init GPIO in 'legacy' approach through GPIO number request.&lt;BR /&gt;I have the simple code:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="c"&gt;//BASE for GPIO2 is : 448
//GPIO2_04 is : 448+4 = 452
gnum = gpio_request(452, "pin2");
if(gnum &amp;lt; 0) return -1;
//Configure as output and set HIGH level
gnum = gpio_direction_output(452, 1); //doesnt work. always 0 at output
if(gnum &amp;lt; 0) return -2;&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;All functions return with OK.&lt;BR /&gt;But.. when I touch my oscilloscope I see low-level at the line&lt;BR /&gt;Command promt:&lt;BR /&gt;&lt;STRONG&gt;cat /sys/kernel/debug/gpio&lt;/STRONG&gt; shows me also - "&lt;STRONG&gt;out lo&lt;/STRONG&gt;" (I m expecting "&lt;STRONG&gt;out hi&lt;/STRONG&gt;")&lt;/P&gt;&lt;P&gt;Alsi I tried to read GPDAT register from memory. And this also shows me zero value in output.&lt;BR /&gt;&lt;BR /&gt;What is going wrong? I cannot to set 'HIGH' level for any pin from GPIO2 block.&lt;BR /&gt;Thanks&lt;/P&gt;</description>
      <pubDate>Sun, 26 Mar 2023 11:49:20 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Layerscape/Cannot-set-GPIO-state-with-gpio-direction-output/m-p/1622054#M12090</guid>
      <dc:creator>Axent</dc:creator>
      <dc:date>2023-03-26T11:49:20Z</dc:date>
    </item>
    <item>
      <title>Re: Cannot set GPIO state with 'gpio_direction_output'</title>
      <link>https://community.nxp.com/t5/Layerscape/Cannot-set-GPIO-state-with-gpio-direction-output/m-p/1622100#M12093</link>
      <description>&lt;P style="margin: 0in; font-family: Calibri; font-size: 11.0pt;" lang="en-US"&gt;Please share the MPU and SDK information&lt;/P&gt;</description>
      <pubDate>Mon, 27 Mar 2023 01:00:21 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Layerscape/Cannot-set-GPIO-state-with-gpio-direction-output/m-p/1622100#M12093</guid>
      <dc:creator>June_Lu</dc:creator>
      <dc:date>2023-03-27T01:00:21Z</dc:date>
    </item>
  </channel>
</rss>

