arduino / ArduinoCore-mbed

345 stars 199 forks source link

Sending more than 63 characters causes Serial to hang #193

Closed technoblogy closed 3 years ago

technoblogy commented 3 years ago

With this test program:

void setup() {
  Serial.begin(9600);
}

void loop (void) {
  if (Serial.available()) Serial.print((char)Serial.read());
}

if you repeatedly paste this 62-character string into the Arduino IDE Serial Monitor input field and press Return it gets echoed fine:

$0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXY

However if you use this string of 63 characters it immediately hangs up:

$0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ

I'm using the core Arduino Mbed OS RP2040 Boards 2.0.0 on a MacBook Pro with Arduino IDE 1.8.13. The board is a Raspberry Pi Pico.

facchinm commented 3 years ago

Hi @technoblogy , thanks for reporting. On Linux there's no such issue (just tested), so I'd ask @sebromero or @alranel to test the issue on their shiny Macbooks :wink:

technoblogy commented 3 years ago

Thank you!

sebromero commented 3 years ago

@facchinm Confirmed. Looks like it's time to solder the SWD headers...

technoblogy commented 3 years ago

Any progress on tracking this down?

facchinm commented 3 years ago

@technoblogy I pushed #218 , tested on OSX :slightly_smiling_face: May you test it too and report if everything is fixed?

technoblogy commented 3 years ago

It works perfectly - thank you! I can now send 8000 bytes over serial with no errors.

Any idea when this fix will be included in a new Arduino core release?

facchinm commented 3 years ago

The release is expected very early next week :slightly_smiling_face:

technoblogy commented 3 years ago

Thanks! That's enabled me to port my Lisp interpreter, uLisp, to the Raspberry Pi Pico;

http://www.ulisp.com/show?3KN3

alranel commented 3 years ago

@technoblogy Consider mentioning the Arduino Nano RP2040 Connect board in your tutorial as a way to support our work on this open source software :)

technoblogy commented 3 years ago

OK, thanks for the suggestion, I'll get hold of an Arduino Nano RP2040 Connect board with the aim of adding that to my tutorial.