Skip to content

Bogus character received on Serial1 after .begin() #1153

@dlkeng

Description

@dlkeng

Raspberry Pi Pico / RP2040 Version 2.7.1

On a Raspberry Pi Pico, on Serial1, shortly after Serial1.begin(), a single bogus character is received by the UART0. This character is dependent on the baud rate: At 115200, the character is 0xFC; at 38400 and 57600, the character is 0xFF. At less than 38400, no bogus character is received.

This has been seen on two different Raspberry Pi Pico's and one Raspberry Pi Pico W.
It was seen on GP0/GP1, GP12/GP13, and GP16/GP17 pins associated with UART0.
This does not occur if the Rx pin is tied low or floating. It only occurs when the Rx pin is tied high (pullup to +3V3 or direct to +3V3) or driven high by an RS-232 transceiver.

This does not occur on Serial2.

This does not occur on the official Arduino Mbed OS RP2040 core.

The following is a simple test sketch to demonstrate this issue:

void setup()
{
    Serial1.begin(115200);
}

void loop()
{
    if (Serial1.available())
    {
        // At less than 38400, no characters at startup!
        // 38400, 57600: emits one 0xFF at startup!
        // 115200: emits one 0xFC at startup!
        Serial1.print(Serial1.read(), HEX);
    }
}

Metadata

Metadata

Assignees

No one assigned

    Labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions