Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ESP32 "uart event queue full" messages #3704

Closed
peterhinch opened this issue Apr 9, 2018 · 1 comment
Closed

ESP32 "uart event queue full" messages #3704

peterhinch opened this issue Apr 9, 2018 · 1 comment

Comments

@peterhinch
Copy link
Contributor

The following script, run with a loopback connection:

import uasyncio as asyncio
import machine

uart=machine.UART(2,baudrate=9600, tx=14, rx=27)

async def sender():
    count = 0
    swriter = asyncio.StreamWriter(uart, {})
    while True:
        await swriter.awrite('Hello uart {:5d}\n'.format(count))
        await asyncio.sleep(2)
        count += 1

async def receiver():
    sreader = asyncio.StreamReader(uart)
    while True:
        res = await sreader.readline()
        print('Recieved', res)

loop = asyncio.get_event_loop()
loop.create_task(sender())
loop.create_task(receiver())
loop.run_forever()

produces this result:

MicroPython v1.9.3-521-gd6cf5c67 on 2018-04-08; ESP32 module with ESP32
Type "help()" for more information.
>>> import rats51
I (47174056) uart: queue free spaces: 10
Recieved b'Hello uart     0\n'
Recieved b'Hello uart     1\n'
Recieved b'Hello uart     2\n'
Recieved b'Hello uart     3\n'
Recieved b'Hello uart     4\n'
Recieved b'Hello uart     5\n'
Recieved b'Hello uart     6\n'
Recieved b'Hello uart     7\n'
Recieved b'Hello uart     8\n'
Recieved b'Hello uart     9\n'
W (47194136) uart: UART event queue full
Recieved b'Hello uart    10\n'
W (47196146) uart: UART event queue full
Recieved b'Hello uart    11\n'
[continues to run indefinitely with these messages]

This does not seem to affect the script's operation.

@dpgeorge
Copy link
Member

Thanks for the report. I can confirm the error and have fixed it in 4ff05ae

dpgeorge added a commit that referenced this issue Apr 10, 2018
This event queue has UART events posted to it and they need to be drained
for it to operate without error.  The queue is not used by the uPy UART
class so it should be removed to prevent the IDF emitting errors.

Fixes #3704.
jgillick pushed a commit to jgillick/micropython that referenced this issue Nov 24, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants