This is a hack, but it might work. I don't have an ESP32 to test, sorry.lgrodzki wrote: ↑Tue Jul 12, 2022 1:06 pmHello, I have a problem, I installed micropython 1.19.1 on an esp32 and I need a sendbreak on the UART with more than 13 milliseconds. Unfortunately sendbreak has no duration option and it only lasts 8 milliseconds. Would there be any alternative to increase the sendbreak duration time in the UART?
Define the transmit pin before you instantiate the serial port. Something like this (not tested and might require editing):
Code: Select all
uart_0_tx_pin = machine.Pin(<number>, machine.Pin.OUT)
You should be able to set the value of the pin at will and for your required duration.
Code: Select all
uart_0_tx_pin.value(1)
<some waiting code>
uart_0_tx_pin.value(0)
Well, I highlighted "before" for a reason. Don't do it after instantiating the UART or it will never be connected to the UART.