Skip to content

Crashing when writing more than 64 bytes to Serial #85

Closed
@tjpetz

Description

@tjpetz

Writing more than 64 bytes to Serial on the Nano 33 BLE Sense board causes the board to crash and to start blinking the LED in the SOS pattern.

The following code reproduces the problem. The execution of the line that writes 65 bytes (buff_65) will crash.

/**
 * Demonstrate the bug on Nano BLE board when attempting to write more than 64 bytes
 * in one shot to the serial port.
 */
 
void setup() {
  // put your setup code here, to run once:

  Serial.begin(115200);
  delay(3000);
  
  const char *buff_64 = "abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ01234567890a";
  Serial.println(strlen(buff_64));
  Serial.println(buff_64);

  const char *buff_65 = "abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ01234567890ab";
  Serial.println(strlen(buff_65));
  
  // This statement will cause the board to go into SOS mode.
  Serial.println(buff_65);

  Serial.println("If this line prints then the limit of 64 in a single shot is fixxed!");
  
}

void loop() {
  // put your main code here, to run repeatedly:

}

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions