Disable UART1 boot messages
Disable UART1 boot messages
I'm using an ESP8266 with a serial sound module on UART1. I've got it working (transmit only). However, it only works if I connect the TX1 line after boot. Otherwise the boot data on the TX1 line crashes the sound module which requires a hard reset.
Is there any way to prevent the system from dumping data to TX1?
Is there any way to prevent the system from dumping data to TX1?
Re: Disable UART1 boot messages
Bootloader messages, no. Otherwise, docs: http://docs.micropython.org/en/latest/e ... rd-control
Awesome MicroPython list
Pycopy - A better MicroPython https://github.com/pfalcon/micropython
MicroPython standard library for all ports and forks - https://github.com/pfalcon/micropython-lib
More up to date docs - http://pycopy.readthedocs.io/
Pycopy - A better MicroPython https://github.com/pfalcon/micropython
MicroPython standard library for all ports and forks - https://github.com/pfalcon/micropython-lib
More up to date docs - http://pycopy.readthedocs.io/
Re: Disable UART1 boot messages
That's too bad. The debug messages were off by default.
Is there a reason you can't disable the bootloader messages on UART1?
Are there any Micropython compatible boards that have an unused UART?
Is there a reason you can't disable the bootloader messages on UART1?
Are there any Micropython compatible boards that have an unused UART?
Re: Disable UART1 boot messages
If you do not need WiFi, try the Pyboard. If you need WiFi, you could try WiPy 1. Even if it is not manufactured any more, you may still be able to get one. You can also try one of the new ESP32 boards like WiPy2, Wemos LoLin32, Adafruit Feather ESp32, ... For ESP32 devices there the Micrpython.org port and the port by pycom.io.
Re: Disable UART1 boot messages
Possible you could try to power on the sound module with a GPIO pin? That should need a Mosfet because of a higher load than the pin can provide, but that way you could power on the sound module a little more controlled manually after booting the board.
Or maybe you could reset the module after booting MicroPythpon and disabling the debug messages?
Or maybe you could reset the module after booting MicroPythpon and disabling the debug messages?
Re: Disable UART1 boot messages
I picked up a generic ESP32 and will take a shot. Is one port better than the other?Roberthh wrote:For ESP32 devices there the Micrpython.org port and the port by pycom.io.
Re: Disable UART1 boot messages
That's hard to say. While the pycom.io port seems more complete, the micropython.org port seems more stable and has the larger stack size. But the impression of robustness may also only results from a smaller user community. If it offers all features, I personally would start with the micropython.org port.Is one port better than the other?
- pythoncoder
- Posts: 5956
- Joined: Fri Jul 18, 2014 8:01 am
- Location: UK
- Contact:
Re: Disable UART1 boot messages
If these messages occur only on boot and not in operation I'd suggest a logic OR gate on the TX line. One input goes to TX, the other to a GPIO line with a pullup to 3.3V. The output goes to your device. This relies on the fact that a pin is configured as an input until your code changes it to an output. When your code runs, set it to be a low output. Avoid pin 15.
A solution using a transistor rather than a gate is here viewtopic.php?f=16&t=2078. Ignore the text in that posting which has confused some readers - the circuit does as I describe. I'd suggest 1KΩ for the lower resistor and 1-3.3KΩ for the one between GPIO and 3V3.
A solution using a transistor rather than a gate is here viewtopic.php?f=16&t=2078. Ignore the text in that posting which has confused some readers - the circuit does as I describe. I'd suggest 1KΩ for the lower resistor and 1-3.3KΩ for the one between GPIO and 3V3.
Peter Hinch
Index to my micropython libraries.
Index to my micropython libraries.
Re: Disable UART1 boot messages
@pythoncoder Thanks, that is a very clever solution but I already went ahead and switched to the ESP32. The one I picked up has a UART2 that has both RX and TX and does not appear to receive any boot or debug data.
It works great. The only thing I haven't figured out is after I initialize the UART2, the first 2 bytes written disappear. After the 2 lost bytes, it works as expected.
It works great. The only thing I haven't figured out is after I initialize the UART2, the first 2 bytes written disappear. After the 2 lost bytes, it works as expected.
Re: Disable UART1 boot messages
If the two lost bytes are reproduceable when using other devices, you should file a bug report!