UART event queue full

All ESP32 boards running MicroPython.
Target audience: MicroPython users with an ESP32 board.
Post Reply
robox
Posts: 3
Joined: Thu Feb 22, 2018 1:29 pm

UART event queue full

Post by robox » Sun Mar 04, 2018 5:31 pm

I'm using the second and third UART on an ESP32 for a project. I keep getting a "uart: UART event queue full" when the UART is getting messages (loads of them from a sensor). Reading the UART seems to work fine regardless of the errors.

I'm using the following code to set it up, using boot.py

uart2 = UART(1, 9600)
uart2.init(9600, bits=8, parity=None, stop=1, rx=22, tx=23)

I read about setting the buffer size manually with buffer_size=1024, but that did not work for me:

>>> uart2.init(9600, bits=8, parity=None, stop=1, rx=22, tx=23, buffer_size=1024)
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
TypeError: extra keyword arguments given


I don't really know what I'm doing and would appreciate any tips you may have :)

Edit: Tried physics and multiplexed pins, simply typing into the RX-pin from a Putty terminal, updating the firmware and using another ESP32-Wroom on an ESP32 Devkit. I still keep getting these "W (59495) uart: UART event queue full" errors.

m_joule
Posts: 1
Joined: Thu Mar 15, 2018 6:06 pm

Re: UART event queue full

Post by m_joule » Thu Mar 15, 2018 6:08 pm

I am experiencing the same issue.

robox, have you found a solution yet?

Any help is appreciated!

robox
Posts: 3
Joined: Thu Feb 22, 2018 1:29 pm

Re: UART event queue full

Post by robox » Fri Mar 23, 2018 8:32 am

[quote=m_joule post_id=26154 time=1521137297 user_id=3822]
I am experiencing the same issue.

robox, have you found a solution yet?

Any help is appreciated!
[/quote]

I Have still not found a solution to this. It seems dpgeorge did an update to the UART-code a few days ago https://github.com/micropython/micropyt ... c42ed84cb8 but it doesn't seem to have solved the issue.

audstanley
Posts: 2
Joined: Fri Mar 23, 2018 8:32 pm

Re: UART event queue full

Post by audstanley » Fri Mar 23, 2018 9:16 pm

Also having the same issue. I'm trying to read from UART, and even when the esp32 receives a few bytes of data, I get:

W (211907) uart: UART event queue full

I just got the esp32, and I was really hoping that serial would work with micropython:
uart = UART(2, 9600)
uart.init(9600, bits=8, parity=None, stop=1)
a = uart.readline()

and as soon as a message comes in, i get the event queue full.

Also get the error after sending 11 newlines:
>>> uart.write('\n')
1
>>> uart.write('\n')
1
>>> uart.write('\n')
1
>>> uart.write('\n')
1
>>> uart.write('\n')
1
>>> uart.write('\n')
1
>>> uart.write('\n')
1
>>> uart.write('\n')
1
>>> uart.write('\n')
1
>>> uart.write('\n')
1
>>> uart.write('\n')
1
>>> W (276375) uart: UART event queue full


Any help would be appreciated. I don't really need to send utf-8, but it's quick for testing. Is there a way to flush the buffer or something?

audstanley
Posts: 2
Joined: Fri Mar 23, 2018 8:32 pm

Re: UART event queue full

Post by audstanley » Sun Mar 25, 2018 1:47 am

So i figured out what the issue was...

I was sending serial data to the esp32 over 5v logic. Luckily, my buddy came by our shop, and dropped off some 3v to 5v logic switchers:

https://us.banggood.com/Wholesale-Wareh ... ssQAvD_BwE

These guys fixed the issue right up. Now I can serial send commands right into the repl, though that was not exactly what i was looking for. Duh, UART. *face palm. I'm still fairly new to serial in general, but I was hoping i could pull from the buffer, and use a byte string and python's pack and unpack function from the struct library to use that data to trigger functions in micropython, but this changes everything. long story short, pick up some 3v to 5v logic converters. I was able to send from micropython to my computer, without logic converters, but I could not receive serial from micropython without these logic converters. :D

robox
Posts: 3
Joined: Thu Feb 22, 2018 1:29 pm

Re: UART event queue full

Post by robox » Thu Apr 05, 2018 10:12 am

I dont think we are facing the same issue. I've been using 3.3v logic all the time, and still have this problem. Have been using an ESP8266 without any issues. Going to try to compile micropython myself with lower error logging level and see if that works.

User avatar
liudr
Posts: 211
Joined: Tue Oct 17, 2017 5:18 am

Re: UART event queue full

Post by liudr » Sun Apr 08, 2018 3:43 am

I have the same issue. After the event queue full message, I checked my serial port object:

Code: Select all

ser
UART(2, baudrate=768307, bits=3, parity=None, stop=1, tx=22, rx=23, rts=-1, cts=-1, timeout=0, buf_size=512, lineend=b'\r\n')
     Event task minimum free stack: 0
I had it at 9600! There is some bug in the code. I am using lobo firmware and he said he made some fixes on 2/2/2018:

https://github.com/loboris/MicroPython_ ... /issues/50

My firmware is dated 3/21/2018 and should have the fix. The code I have was running inside main.py. When I was running it in serial REPL, there was no problem. Will write back when I have more information.

loboris
Posts: 344
Joined: Fri Oct 02, 2015 6:19 pm

Re: UART event queue full

Post by loboris » Sun Apr 08, 2018 3:22 pm

@liudr

The uart boudrate is correct, only the value printed is wrong.
It is fixed in the latest update.

User avatar
pythoncoder
Posts: 5956
Joined: Fri Jul 18, 2014 8:01 am
Location: UK
Contact:

Re: UART event queue full

Post by pythoncoder » Mon Apr 09, 2018 6:05 am

I have a script which produces this error on the official port. I haven't seen it on the Loboris port. There is no question of overvoltage as it simply uses a loopback. I have raised an issue.
Peter Hinch
Index to my micropython libraries.

Post Reply