• The air is filled with wifi and bluetooth devises at my office, so during the day the console over BLE is not very stable, it keeps disconnecting. Evenings its better.

    So I had a go at the serial console, this worked so so.
    On my Windows computer with chrome, it all works ok.
    But on the Mac with chrome the baudrate is wrong. The port seam to open with 115200 instead of 9600.
    But if I in a terminal run "sudo stty -f /dev/cu.usbserial-AM00LOVW 9600" just after pressing connect in the WebIDE, it makes contact.

    While I can get it working, it also failes on downloads every now and then, specially to flash.
    ">New interpreter error: UART_OVERFLOW"

  • 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.

  • Post a reply
    • Bold
    • Italics
    • Link
    • Image
    • List
    • Quote
    • code
    • Preview
About

usb-usart for webide, Pixel.js on chrome on mac...

Posted by Avatar for user127454 @user127454

Actions