Page 1 of 2

Disable UART1 boot messages

Posted: Sat Jun 17, 2017 9:46 pm
by rdagger
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?

Re: Disable UART1 boot messages

Posted: Sun Jun 18, 2017 2:48 pm
by pfalcon
Bootloader messages, no. Otherwise, docs: http://docs.micropython.org/en/latest/e ... rd-control

Re: Disable UART1 boot messages

Posted: Sun Jun 18, 2017 4:55 pm
by rdagger
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?

Re: Disable UART1 boot messages

Posted: Sun Jun 18, 2017 6:06 pm
by Roberthh
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

Posted: Sun Jun 18, 2017 10:04 pm
by kfricke
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?

Re: Disable UART1 boot messages

Posted: Sun Jun 18, 2017 10:12 pm
by rdagger
Roberthh wrote:For ESP32 devices there the Micrpython.org port and the port by pycom.io.
I picked up a generic ESP32 and will take a shot. Is one port better than the other?

Re: Disable UART1 boot messages

Posted: Mon Jun 19, 2017 5:13 am
by Roberthh
Is one port better than the other?
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.

Re: Disable UART1 boot messages

Posted: Mon Jun 19, 2017 6:06 am
by pythoncoder
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.

Re: Disable UART1 boot messages

Posted: Mon Jun 19, 2017 10:52 pm
by rdagger
@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.
IMG_20170619_141106.jpg
IMG_20170619_141106.jpg (224.68 KiB) Viewed 8807 times

Re: Disable UART1 boot messages

Posted: Tue Jun 20, 2017 6:48 am
by kfricke
If the two lost bytes are reproduceable when using other devices, you should file a bug report!