10000 Hang when reading from UART and writing to filesystem on RPI Pico · Issue #7488 · micropython/micropython · GitHub
[go: up one dir, main page]

Skip to content

Hang when reading from UART and writing to filesystem on RPI Pico #7488

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

Open
murzoh opened this issue Jul 4, 2021 · 1 comment
Open

Hang when reading from UART and writing to filesystem on RPI Pico #7488

murzoh opened this issue Jul 4, 2021 · 1 comment

Comments

@murzoh
Copy link
murzoh commented Jul 4, 2021

When reading from UART and trying to write the read line to a file the board has a hard hang. I've confirmed the following code causes the issue on both an RPI Pico and a Pimorini Pico Lipo. The hang occurs anywhere from the first iteration of the loop, most often early, but can run to 10 or 20.

*Note: I'm not sure if this is the same issue as (#7204) but thought I'd raise anyway.

I've run the same code on an ESP-32 board (Firebeetle v4) with no issue. The UART is read and line written to file with no issues.

Sample code that draws the error (apologies I'm not the best coder so apologies for the quality of the code):
import os
import machine

#print sys info
print(os.uname())

f_debug = open('debug_test116.log', 'a')
f_debug.write('=======STARTED =======\n')
f_debug.flush()

#print uart info
uart = machine.UART(1, baudrate=9600, txbuf=1024, rxbuf=1024, timeout=1000, timeout_char=4 )
print(uart)

i = 0
while i < 1000:
line = uart.readline()
f_debug.write(str(line))
f_debug.flush()
print(line)
i = i + 1

print()
print("- bye -")

@murzoh murzoh changed the title Hang when reading from UART and writing to filesystem Hang when reading from UART and writing to filesystem on RPI Pico Jul 4, 2021
@purpleskyfall
Copy link

I had the same problem using MicroPython v1.20.0 on RPI Pico, is there any progress?

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
0