Description
Hardware
Arduino Nano Matter
Core version
2.0.0
Arduino IDE version
2.3.2
Operating system
macOS Catalina 10.15.7
Radio stack variant
Matter
OpenThread Border Router device (if using Matter)
N/A
Issue description
In some situations the Serial interface locks up on the Arduino Nano Matter, making further serial communication impossible until the board is reset.
I can demonstrate this in two different situations. These may have the same cause, or there may be two different problems:
Entering text into the Serial Monitor causes the Serial to hang up after about 384 characters.
Run the following sketch:
void setup() {
Serial.begin(9600);
}
int Count = 0;
void loop (void) {
if (Serial.available()) {
Serial.read(); Count++;
if (Count % 64 == 0) Serial.println(Count);
}
}
Then cut and paste all the following text (total 512 characters) into the Serial Monitor input field, and press Return:
$0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ
$0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ
$0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ
$0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ
$0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ
$0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ
$0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ
$0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ
The Serial Monitor prints:
64
128
192
256
320
384
ie it hangs up after 384 characters and doesn't reach 512.
Once it hangs up the Serial is totally unresponsive, and the only solution seems to be to reset the processor.
This test works fine on all other Arduino boards I've tested.
Entering a string of exactly 63 characters into the Serial monitor causes it to lock up.
Install this program:
void setup() {
Serial.begin(9600);
}
void loop (void) {
if (Serial.available()) Serial.write(Serial.read());
}
Repeatedly copy and paste this string of 63 characters into the Serial Monitor, and press Return:
0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ&
After the first attempt the Serial Monitor locks up and becomes unresponsive.
I have verified that the issue doesn't occur on Windows 10.
I have previously reported a similar issue on the RP2040: arduino/ArduinoCore-mbed#193
Serial output
See above.
RTT output (if using Matter)
N/A
Minimal reproducer code
See above.