uart.write()
?randomly? blocks in SAMD51
#10061
Unanswered
cajomferro
asked this question in
Hardware & Peripherals
Replies: 2 comments 23 replies
-
Thank you for the report. I have set up the test with a ItsyBitsy M4, but at first I just loop back tx to RX. Not stops within > 1000 iterations for both 50ms and 100ms. I have set up a simple echo test as well (see below) using an rp2 as counterpart with the same results. Only the rp2 seems to pile up incoming messages, if the delay is shorter than 70ms. You may as well try the loopback test to sort out the XBEE.
|
Beta Was this translation helpful? Give feedback.
23 replies
-
Fixed by #10021 . |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
I have an ATSAMD51 microcontroller integrated in a project-specific board which has also a xbee3 RF module. I've built the firmware myself based on the SPARKFUN_SAMD51_THING_PLUS port. The microcontroller is currently running Micropython v1.19.1-712-gb120d3b2f including this patch which affected the
uart.read()
.I can access the Microcontroller REPL via UART (over USB port on macos) and I've managed to send/receive commands to the xbee3 via a secondary UART.
However, there seems to be a problem with the
uart.write()
function. Randomly (seems to me) this function blocks the entire microcontroller (cannot use the REPL anymore), and only a button reset can fix it. Moreover, after the reset I have to wait some seconds ( ~10) before I can access the REPL again.This is a simple demo I've made to try to characterize the problem:
I've run this demo using different sleeping durations (50ms, 100ms, and 1000ms). The numbers on the right represent the iteration when the
uart.write()
blocks. So, for example, usingtime_ms=50
on the second run, it got 249 iterations before blocking and usingtime_ms=100
on the fifth run, it got only 2 iterations before blocking. So it seems to me it is a random behavior right?Can anyone replicate this situation?
Thank you in advance and congratulations on the Micropython project. It is awesome!!
Beta Was this translation helpful? Give feedback.
All reactions