When I build and upload this from PlatformIO IDE the serial output on alternate USART pins (PA1, PA2) is garbled (output looks like wrong baud rate):
If I use primary USART (delete Serial.swap(1)or replace it with Serial.swap(0)) the same output continues on alternate USART, nothing on primary USART. I tried Serial.pins() instead of Serial.swap() -> same result.
Same code built on Arduino IDE (except first #include line) works as expected, both on primary and alternate USART.
In both cases I program via UPDI / jtag2updi.
Any advise on what is going on here would be highly appreciated, as I prefer working in PlatformIO IDE.
Code in PlatformIO IDE:
platformio.ini:
Serial.swap(1)
or replace it withSerial.swap(0)
) the same output continues on alternate USART, nothing on primary USART. I triedSerial.pins()
instead ofSerial.swap()
-> same result.In both cases I program via UPDI / jtag2updi.
Any advise on what is going on here would be highly appreciated, as I prefer working in PlatformIO IDE.