Fastest way to set GPIO pin


I use a GPIO pin to switch between communication interfaces of my modem. When i set output to 1 modem switches to receive mode, and when i set it to 0 modem switches to transmit mode.

The problem is that the switching between receive and transmit mode has some delay. I want to reduce this delay. i want to know if there is a faster way to set GPIO pins. I use the following AT command approach.

adl_atCmdCreate( "AT+WIOM=1,\"GPIO22\", 1,0\r",  ADL_AT_PORT_TYPE(ADL_AT_UART1, FALSE), NULL, NULL, NULL);

i use Airprime Q2687RD, FW R7.45


I think, using ADL GPIO service is faster. But for what? Awneil, i think, can once again ask your his favorite “smart” question.
If your need something like half-duplex RS-485 RX/TX control, any Open-AT solution is too slow. Always better to use hardware logic for automatic RX/TX control.


Hello victorjd,
thank you for your answer. Yes i use it for RS485 Tx and Rx switch. You are probably right about using hardware solution insead. but i dont know why our hardware designer left it to me. i will think about a better design but now i need a temporary solution.
I will try GPIO service and will share the result here.


i have tried GPIO service and i see that GPIO service is faster than AT command in terms of setting an output pin.
Now the delay, switching from 1 to 0, has been reduced.
Thank you all.