I'm using python on a Raspberry Pi to test an external device.
The external device requires that the UART Tx line be low during initialization. To accomplish this I configure the UART Tx line as a GPIO output during initialization:
GPIO.setup(14, GPIO.OUT) GPIO.output(14, GPIO.LOW)
At a later time, I configure the UART:
However, once the port has been configured as a GPIO, the UART does not work (no characters are transmitted) unless the Raspberry Pi is rebooted.
The UART works fine when the GPIO is NOT configured.
Adding GPIO.cleanup() has no effect.
Is there a way to programatically undo the GPIO configuration?