Showing results for 
Show  only  | Search instead for 
Did you mean: 
Registered: ‎09-30-2011

Zynq: Using Linux sysfs to read EMIO as input

Hello all!

I have a Zynq-based system running Linux and have 2 input GPIO pins that are connected as EMIO. I am trying to use the sysfs interface to read the current logic value of the input pin and am seeing some unexpected behavior. The big picture is that the logic value I read does not track the actual electrical value as that value changes. In order to detect the actual value I need to "unexport" the pin, "export" it and then read the "value" component. Only does that sequence guarantee that I see the logic value on the input pin

I only see this behavior on the EMIO declared as an input not the 'regular' MIO when declared as input.

That is to get the actual pin state in the 'value' I need to first unexport and then export the pin. This seems odd and unexpected to me. Does anyone have any insights as to how to get the actual state of an input pin without the unexport/export pair requirement.

0 Kudos
0 Replies