UART sendbreak bug
There is a bug with the uart.sendbreak() method with V1.17 (haven't checked the latest)
The manual states the break signal lasts 13 bits. It actually is 11.
This has caused errors with external sensors that utilize the SDI-12 protocol. .The line needs to go for at least 12ms. Now, it is 9.167 ms. Even 13 bits is not long enough.
A good solution is to add a property where you can specify how many bits you can use.
SDI-12 is popular in agriculture and other industrial applications. (www.sdi-12.org)
Esp32: Add explicit "wait_tx_done" method to UART
Hello folks,
Faced with issue, I cannot control time when UART TX done from MicroPython.
Use case is next:
- I've tried to communicate by raw RS485 and I should know when exactly disable TX pin.
Currently, there are couple workarounds (judged by sources and undocumented). In these methods called uart_wait_tx_done():
- Via
init()method. E.g. send bytes and callinit(). But if implementation will be changed in future such method stopped worked. Especially this method is very strange to call in the middle of the UART operation. - Via
sendbreak()method. But also undocumented plus it always sends\x00
Proposal:
- I think it would be good to add explicit method for waiting UART TX done.