We are interfacing dot matrix led to x27 connector of Ixora-iMX6 evaluation board. Using bit-bang method , we want to send data and clock to dot matrix led.
I have used below gpio’s of x27 connector ;
GPIO2_IO04 as data line
GPIO2_IO05 as clock line
GPIO2_IO06 as chip select
GPIO2_IO07 as control line
Now i want to toggle above gpio’s. as a initial plan, i have tried using sysfs to toggle gpio’s.
But none of the above 4 gpio’s are toggling using below commands;
echo 36 > /sys/class/gpio/export
cd /sys/class/gpio/gpio36
echo “out” > direction
echo 1 > value
cat value
0
I am using imx6q-apalis-ixora.dtb file. Any pointer on above issue.
Hi. Have you measured the output voltage (or connected one output to an input pin)? My mx6 always states the value of an output pin as “0” no matter if its high or low.
Does the output actually change for you? Did you check with an oscilloscope or do you just rely on output of “cat”? Note that SION bit needs to be set to be able to read back value of an output GPIO. One would have to set something like below in the device tree. We do not set this by default in our device tree.
A limited option exists to override the default pad functionality and force the input path
to be active (ipp_ibe==1’b1) regardless of the value driven by the corresponding module.
This can be done by setting the SION (Software Input On) bit in the
IOMUXC_SW_MUX_CTL register (when available) to “1”.
Uses include:
LoopBack - Module x drives the pad and also receives pad value as an input.
GPIO Capture - Module x drives the pad and the value is captured by GPIO.