But on the Mac with chrome the baudrate is wrong. The port seam to open with 115200 instead of 9600.
There is a setting in the Web IDE for the baud rate - have you tried checking that is correct? If you'd been using it for ESP8366/ESP32 you might have set the baud rate up for that previously?
UART_OVERFLOW
What percentage of the time would you say it occurs? Maybe the write to flash blocks the interrupt handling for too long.
It's possible that doing Serial1.setup(9600,{rx:D0,tx:D1,flow:"xon"}) will help, as it'll enable flow control over the serial port which may stop characters coming in some of the time.
UART on the nRF52 chips in Pixl.js is pretty tricky - basically while it can run with a hardware FIFO, you don't appear to get an interrupt until the FIFO is full - which means that if you have a 16 byte FIFO and you send the text "LED.set()\n", nothing will happen until you send another 6 black characters! As a result we have to use two single-byte buffers, but with the internal buffering that still only gives us around 5 bytes of buffer, so while we use high priority interrupts if something more important jumps up, we get the UART_OVERFLOW.
Espruino is a JavaScript interpreter for low-power Microcontrollers. This site is both a support community for Espruino and a place to share what you are working on.
There is a setting in the Web IDE for the baud rate - have you tried checking that is correct? If you'd been using it for ESP8366/ESP32 you might have set the baud rate up for that previously?
What percentage of the time would you say it occurs? Maybe the write to flash blocks the interrupt handling for too long.
It's possible that doing
Serial1.setup(9600,{rx:D0,tx:D1,flow:"xon"})
will help, as it'll enable flow control over the serial port which may stop characters coming in some of the time.UART on the nRF52 chips in Pixl.js is pretty tricky - basically while it can run with a hardware FIFO, you don't appear to get an interrupt until the FIFO is full - which means that if you have a 16 byte FIFO and you send the text
"LED.set()\n"
, nothing will happen until you send another 6 black characters! As a result we have to use two single-byte buffers, but with the internal buffering that still only gives us around 5 bytes of buffer, so while we use high priority interrupts if something more important jumps up, we get the UART_OVERFLOW.