You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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
i = 0
while i < 1000:
line = uart.readline()
f_debug.write(str(line))
f_debug.flush()
print(line)
i = i + 1
print()
print("- bye -")
The text was updated successfully, but these errors were encountered:
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
Uh oh!
There was an error while loading. Please reload this page.
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 -")
The text was updated successfully, but these errors were encountered: