Page 1 of 1

receive over serialUSB a string more than 191 chars causes a reset with core 2.0.0 and mapleMini

Posted: Sat May 29, 2021 2:08 pm
by Ralf9
Hi,

I use the arduino IDE.
With core 1.9.0 and with Arduino nano I can easily receive over serialUSB a string with more then 200 chars

hier is a testsketch

Code: Select all

String cmdstring = "";
bool command_available=false;

void setup() {
  cmdstring.reserve(600);
  Serial.begin(115200);
  while (!Serial) {
    ; // wait for serial port to connect. Needed for native USB
  }
}

void loop() {
   if (command_available == true) {
      command_available=false;
      Serial.println(cmdstring.length());
      Serial.println(cmdstring);
      if (!command_available) {cmdstring = "";}
   }
}

void serialEvent()
{
   while (Serial.available())
   {
      char inChar = (char)Serial.read();
      switch(inChar)
      {
      case '\n':
      case '\r':
      case '\0':
         command_available=true;
         break;
      default:
         cmdstring += inChar;
      }
   }
}
This 191 char string ist ok

Code: Select all

123456789z123456789z223456789z323456789z423456789z523456789z623456789z723456789z823456789z923456789z023456789z123456789z223456789z323456789z423456789z523456789z623456789z723456789z823456789z9
and this 192 char string causes a reset

Code: Select all

123456789z123456789z223456789z323456789z423456789z523456789z623456789z723456789z823456789z923456789z023456789z123456789z223456789z323456789z423456789z523456789z623456789z723456789z823456789z92

Re: receive over serialUSB a string more than 191 chars causes a reset with core 2.0.0 and mapleMini

Posted: Sat May 29, 2021 3:58 pm
by fpiSTM
Hi, it is already reported:
https://github.com/stm32duino/Arduino_C ... ssues/1399

Since an HAL update there is a regression.

Re: receive over serialUSB a string more than 191 chars causes a reset with core 2.0.0 and mapleMini

Posted: Thu Jul 01, 2021 10:41 pm
by Ralf9
with this bug i can't use the core 2.0.0 in my project.

if I want use platformio, which release has not the serial big data bug? 7.0.0 or can I use a newer?
https://github.com/platformio/platform-ststm32/releases