Serial Ports
nXPico M exposes one serial port to the application.
| Port | Peripheral | Pins | Available |
|---|---|---|---|
| COM1 | USB-CDC | USB-C | No — CODESYS gateway |
| COM2 | — | — | Does not exist |
| COM3 | UART1 | GP4 TX / GP5 RX | Yes |
Why COM2 is missing
Section titled “Why COM2 is missing”The RP2350 has two UART peripherals. On this board UART0 is wired to the nRF9151 modem (GP16/GP17, with CTS/RTS on GP18/GP19). Opening it as COM2 would mean reassigning its pins and changing its baud rate — disconnecting the modem while the application is talking to it. The runtime therefore refuses port 2: SysComOpen2 returns an invalid handle.
This is not a pin conflict that configuration can resolve. GP12/GP13, which are COM2’s pins on the other boards, are pins of UART0 too — the same peripheral the modem holds. On nXPico M GP12 and GP13 are free as ordinary GPIO or I²C, but they cannot become a serial port.
Using COM3
Section titled “Using COM3”Identical to the other boards — see the full example on the nXPico Serial Ports page: open with SysComOpen2 on port 3, read with ulTimeout := 0 so the PLC cycle never blocks, interrupt-driven reception.
The modem is not reachable through SysCom with any port number. It has its own I/O channels — see Modem.
No diagnostic log by default
Section titled “No diagnostic log by default”On the other boards the runtime prints a boot log on GP0. On nXPico M UART0 is the modem’s and UART1 is COM3’s, so there is no log in the standard firmware: printf output is discarded. Diagnose through the CODESYS device log instead, which carries the runtime’s own messages — including the modem ones.
A firmware built with the M_UART_LOG_ENABLED option puts the log back on GP4 at 115200 8N1 and gives up COM3 in exchange. Ask neXo if you need that build for debugging.