wokwi/rp2040js

UART write never blocks and doesn't actually write to GPIO pins

c1570 opened this issue · 1 comments

c1570 commented

Writing to the UART never blocks at the moment:

return (this.rxFIFO.full ? RXFF : 0) | (this.rxFIFO.empty ? RXFE : 0) | TXFE;

This also means that printf() using pico_stdio_uart is way faster in emulation than in reality quite often (basically whenever the silicon 8 byte TX buffer is exhausted).

Additionally, using the UART doesn't actually change the GPIO pins but only triggers the onByte() callback:

this.onByte?.(value & 0xff);

Probably not a big deal but worth documenting anyways.