Part Number: AM3352
Tool/software: Linux
Hi
I am trying to use the sysfs GPIO interface to bitbash half duplex 9-bit SPI communications
- this requires I use the same pin as an output to send a command then switch it to an input to read the response.
Everything appears to work on the outgoing side of things
- but when I switch the PIN direction to IN, I always read 0 irrespective of the voltage applied to the pin
I am hoping that someone might be able to suggest what I could be overlooking.
The pin I am using is J15 - "mii1_rx_er" set to mode 7 (GPIO2_2 - i.e. gpio98):
I can see via scope that the voltage changes when in output mode
- the value reported via "cat value" is correct when in output mode (matching what I see on the scope)
However once direction is changed (via echo "in" > direction) "cat value" returns 0 if the applied voltage is high or low.
I have also tried used devmem2 to change the control register (conf_mii1_rx_er - 0x44e10910) pin mux settings
- but no combination of pull up setting will cause the value reported to be "1" for a high applied voltage
Thanks for any suggestions
All the best,
Richard