← index #8867Issue #16182
Related · high · value 1.346
QUERY · ISSUE

esp32 - uart - uasyncio streamreader, always receive b"" from RS485

openby stragaopened 2022-07-05updated 2022-11-15
bugextmod

after commit for uasyncio streamreader, data read from rs485 always b"". If reverse back, start works like before.
https://github.com/micropython/micropython/commit/db7682e02d3ffd3338f20effc9ad4735a48bf774

for example.

        self.ac_uart = UART(2, baudrate=9600, tx=14, rx=15)
        self.ac_swriter = asyncio.StreamWriter(self.ac_uart, {})
        self.ac_sreader = asyncio.StreamReader(self.ac_uart)
      while True:
            data = await self.ac_sreader.read(-1)
            log.info(f" RAW: {data}")
CANDIDATE · ISSUE

How to handle fast flipping of RE/DE pins when using ESP32 and RP2040 UART as RS485

closedby yfyungitopened 2024-11-08updated 2024-11-09
enhancement

Description

When using ESP32 and RP2040's UART for RS485 communication, how to handle the fast flipping of RE/DE pins, the different transmission speeds at different baud rates, how to know whether all data on UART has been sent, and how to switch to receiving data as quickly as possible after sending.

Code Size

No response

Implementation

I hope the MicroPython maintainers or community will implement this feature

Code of Conduct

Yes, I agree

Keyboard

j / / n
next pair
k / / p
previous pair
1 / / h
show query pane
2 / / l
show candidate pane
c
copy suggested comment
r
toggle reasoning
g i
go to index
?
show this help
esc
close overlays

press ? or esc to close

copied