← index #4389Issue #4633
Off-topic · high · value 0.938
QUERY · ISSUE

esp8266: Necessity for UART flush

openby cemoxopened 2019-01-01updated 2019-07-06
port-esp8266

This is rather recommendation than issue. The code below sends a string message from UART1 and is supposed to pull the output pin LOW :

mypin.on()
uart1.write("a long sentence")
mypin.off()

when I checked the signal (part tx and output) with logic analyzer, I saw that pin is pulled low long before the uart transmission has been completed. A function like uart.flash() which checks the relevant uart status bits for completion of the transmission would be very handy.

CANDIDATE · ISSUE

UART reading not working in ESP8266 with v1.10

closedby flusflasopened 2019-03-24updated 2019-03-26
port-esp8266

After a lot of testing, I found that UART reading with ESP8266 doesn't work at all in version 1.10. It doesn't raise any exception, but the UART cannot read any character. After downgrading to v1.9.4, it all worked.

I am using UART0 (the only one in the ESP8266 that has RX). Writing works, but reading doesn't (uart.any() returns 0, uart.read() returns None...). I've checked this problem (same code and conditions) with two ESP8266 (Wemos D1 mini) and MicroPython v1.9.3, v1.9.4 and v1.10 (including today release: 20190324). The problem is only present in the latter.

I have checked also with a logic analyzer that the attached device is sending the information correctly to the ESP8266's RX pin (GPIO3). However, in v1.10 I cannot sniff the RX pin, so maybe the problem is related with the pinout configuration.

Maybe I am missing something that has recently changed in the UART library, because I think this is a pretty serious bug for a stable version...

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