Skip to content

Bug with Serial + Hardware Serial when using different baud rates #55

@CiprianFlorin-Ifrim

Description

@CiprianFlorin-Ifrim

Description of defect

If I intitialize Serial.begin(115200) and hardware Serial1.begin(115200), both work.
If I initialize Serial.begin(9600) and hardware Serial1.begin(9600), both work.
If, however, I initialize Serial.begin(115200) and hardware Serial1.begin(9600), the whole code freezes.

Moreover, the battery bug fix solved in 3.0.0 is still persisting with UART.

Target(s) affected by this defect ?

Nicla Sense ME

Toolchain(s) (name and version) displaying this defect ?

Mbed OS Nicla Boards 3.0.1
Latest bootloader
Arduino 1.8.16

What version of Mbed-os are you using (tag or sha) ?

mbed-os-3.0.1

What version(s) of tools are you using. List all that apply (E.g. mbed-cli)

Mbed OS Nicla Boards 3.0.1
Latest bootloader available in the Nicla FW repo
Arduino 1.8.16

How is this defect reproduced ?

Simple example code:

#include <Arduino.h>
#include "Nicla_System.h"

void setup()
{
  nicla::begin();
  Serial.begin(115200);
  Serial1.begin(9600);

  delay(1000);
}

void loop() {
  while(Serial.available()) {
    char incomingCharacter = Serial.read();
    if (incomingCharacter == '1') {
      Serial.println("Command activated");
    }
    delay(100);                   
  }
}

Metadata

Metadata

Assignees

No one assigned

    Labels

    topic: documentationRelated to documentation for the projecttype: supportOT: Request for help using the project

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions