Other Parts Discussed in Thread: AM4378, SN75HVD12
Tool/software: Linux
Hi friends,
I am working on a custom board based on AM4378. I am using SDK ti-processor-sdk-linux-am437x-evm-02.00.00.00. UART5 is using for RS485 communication in half duplex mode and D24 pin for rts and dts pins..
I am trying to enable /disable the gpio0-19(D24) from user space, with the following commands
echo 19 > /sys/class/gpio/export
echo "out" > /sys/class/gpio/gpio19/direction
echo "in" > /sys/class/gpio/gpio19/direction
echo 1 > /sys/class/gpio/gpio19/value
echo 0 > /sys/class/gpio/gpio19/value.
I could see the GPIO19 toggling (from terminal), but the voltage levels at pin D24 pin is still low only even if i set high.
I have used the formula( (32*M+N)) to calculate gpio number for gpio0-19, so i tried with echo 19 > /sys/class/gpio/export. Is that formula correct ? if so why i amunable to see voltage changes at D24 pin.? I have changed the dts files also
....
....
....
gpio0_pins_default: gpio0_pins_default {
pinctrl-single,pins = <
0x270 (PIN_OUTPUT_PULLUP | MUX_MODE7) /*(D24) xdma_event_intr0.gpio0[19]*/
>;
};
gpio0_pins_sleep: gpio0_pins_sleep {
pinctrl-single,pins = <
0x270 (PIN_OUTPUT_PULLUP | MUX_MODE7) /*(D24) xdma_event_intr0.gpio0[19]*/
>;
};
.......
........
........
&gpio0 {
status = "okay";
pinctrl-names = "default","sleep";
pinctrl-0 = <&gpio0_pins_default>;
pincntrl-1 = <&gpio0_pins_sleep>;
gpios = <&gpio0 19 GPIO_ACTIVE_HIGH>;
};
....
....
Thanks in advance.