Skip to content

Portenta C33 serial output is scrambled #104

Closed
@Kees-van-der-Oord

Description

@Kees-van-der-Oord

The implementation of Serial in the renesas_portenta core 1.0.2 does not seem to handle buffer wrapping correctly.

When sending some text such as:

void writeLongStory() {
  Serial.println("The serial send buffer of the Portenta has a size of x bytes.");
  Serial.println("Sending more bytes than that should stall the print function");
  Serial.println("until sufficient bytes are sent and there is enough room for");
  Serial.println("all remaining characters. I don't know why the output of my");
  Serial.println("project is scrambled at the Portenta: the sketch works fine on");
  Serial.println("the Uno R3, Mega R3 and the Nano Every ...");
}

The output is seldom correct, usually corrupted such as (calling the function 3x):

18:54:01.566 -> The serial send buffer of the Portenta has a size of x bytes.
18:54:01.566 -> Sending more bytes than that should stall the print function
18:54:01.566 -> until sufficient bytes are sent and there is enough room forthe Uno R3, Mega R3 and the Nano Every ...
18:54:01.566 -> the output of my
18:54:01.566 -> project is scrambled at the Portenta: the sketch works fine on
18:54:01.566 -> The serial send buffer of the Portenta has aThe serial send buffer of the Portenta has a size of x bytes.
18:54:01.566 -> Sending more bytes than that should stall the print function
18:54:01.566 -> until sufficient bytes are sent and there is enough room for
18:54:01.566 -> all remaining characters. I don't know why the output of my
18:54:01.566 -> er of the Portenta has a size of x bytes. sketch works fine on
18:54:01.566 -> the Uno R3, Mega R3 and the Nano Every ...
18:54:01.566 -> The serial send buff
18:54:01.566 -> of the Portenta has a size of x bytes.tiSending more bytes than that should stall the print function
18:54:01.566 -> unall remaining characters. I don't know why the output of my
18:54:01.566 -> all remaining characters. I don't know why the output of my
18:54:01.566 -> project is scrambled at the Portenta: the sketch works fine on
18:54:01.566 -> the Uno R3, Mega R3 and the Nano Every ...

The test project is here:
PortentaSerialTest.zip

Metadata

Metadata

Assignees

No one assigned

    Labels

    type: imperfectionPerceived defect in any part of project

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions