Because I am running out of GPIOs and I use UART1 only for programming purpose (not in the life cycle of my product), I would like to use the GPIOs multiplexed with UART1.
I am currently polling the level of RTS1 to detect if the system is plugged to a PC. If not, I disable UART1 (AT+WMFM=0,0,1) and try to subscribe to the “RTS1 GPIO” (GPIO6) in order to poll the level of this one to detect if the system is plugged back to a PC.
My problem: The subscription return an error saying that the GPIO is already used !
I can’t find out why. The AT+WMFM return OK and when I try to read RTS1 using adl_portGetSignalState, it returns an error. So I assume that the UART is well disabled.
What do I have to do to make it work? What do I miss?
Thanks a lot for any help,