ArduinoCore-mbed
ArduinoCore-mbed copied to clipboard
Serial1 settings ignored on nano RP2040
Looks like the settings for Serial1 are ignored in mbed core for nano RP2040
Code example tested with a logic analyzer:
void setup() {
Serial1.begin(115200, SERIAL_8E1); // 8bits, Even parity, 1 Stopbit
}
void loop() {
Serial1.write(0x0F);
delay(100);
}
The porting layer should correctly map the Arduino format into something suitable for pico-sdk https://github.com/arduino/mbed-os/blob/extrapatches-6.17.0/targets/TARGET_RASPBERRYPI/TARGET_RP2040/serial_api.c#L83-L100 . However, there's a fix for the SDK that was merged two months ago following this discussion https://github.com/raspberrypi/pico-sdk/issues/548 . So updating to pico-sdk 1.5.1 should do the trick, but we may incur in other regressions so it's not an easy feat.