SL6087 Use UART1's GPIO


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 ! :open_mouth:

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,



Good afternoon Sebastien,

As advised via email, your UART1 is more than likely still enabled which will then not allow you to use the pins as GPIOs. You need to disable UART1 to be allowed to use the associated GPIOs.

Note, you cannot use some pins as GPIOs (e.g. RTS, CTS, DCD, etc.) and others as the UART (TX, RX) simultaneously. It is all or nothing.