I'm developping a software with serial communication for a imx6 board. The software is based in three steps: 1) Up the pin (signal to start the write command) 2) Write the command on serial port 3) Down the pin (signal to finish the write command). After it, I need to wait a response of the command given from another device connected on my serial channel (the pin need be down to capture the response).
The problem is: when I have many commands in sequence (between delays around 100ms), my osciloscope shown that my pin is slowly very much. Consequently when the device will respond my command the pin is "UP", and I can not get the response.
I'm using Qt to develop the application, and calling "system("echo 0 > /sys/class/gpio/gpioXX/value")" and "system("echo 1 > /sys/class/gpio/gpioXX/value")" to control my pin. I'm thinking use another way to "UP" and "DOWN" the pin (like a write directly on register), but I don't know if it is possible. I tried too use the Qprocess class, but without success.
I can't change this standard, because my device use this format of communication.
Any idea to solve my problem?