Jump to content

GPIO on C2 - slow access?


mboehmer

Recommended Posts

Hi,

after getting access to GPIO pins now (thnx to Neil :) ) I wonder that accessing pins be bash scripts gives me quite different access times.

For example, I use one pin to switch a connected device on and off by a MOSFET.  Setting the pin low is fast, setting it high takes about two seconds.

I use the following shell script:

#!/bin/bash
echo "0" > /sys/class/gpio/gpio102/value

("0" for off, "1" for on)

 

Any ideas? The pin seems to switch immediately, while the shell prompt takes about two seconds to return - but ONLY in case of "1".

The corresponding pin is set to output, of course, before :)

 

Best regards, Michael

 

EDIT: problem solved. It was power supply related... the +5V line received a voltage drop when the FPGA was booting up. That drop killed the USB network connection, and the reconnection did cause the long delay.

 

Link to comment
Share on other sites

It was a really hard to track issue: we operate the Odroid and the FPGA from one single 48V/5V DC/DC. The FPGA is powered off while booting, and connected to the GbE port of Odroid. External link is done by USB ethernet.

When powering up the FPGA (by GPIO pin and FET), there was a voltage drop on 5V output of DC/DC due to inrush currents while FPGA memory was not yet cleared.

That voltage dip made the USB ethernet disconnect and (usually) reconnect at once again, so it caused some small delay in the shell.

Changing configuration to have the readout software running increased current consumption, and the USB ethernet just disconnected and stayed in an intermediate condition (not reconnecting to USB, but building up a link on ethernet)....

simply adding three passive components to the FET fixed it (turning it into an inrush current limiter :) )

Link to comment
Share on other sites

Guest
This topic is now closed to further replies.
×
×
  • Create New...

Important Information

Terms of Use - Privacy Policy - Guidelines