Skip to content

bulk pasting code extremely flaky on nRF #3152

Description

@jepler

When pasting blocks of code to the REPL there are lost characters very often. I don't see this on samd51, but I see it all the time on nrf52.

How to reproduce:

  • I use tio as my terminal program
  • Copy this arbitrary line of code: 123456789123456789123456789123456789123456789123456789123456789123456789%11
  • Repeatedly paste it into the REPL, hitting enter at the end if necessary

Expected behavior: The line of code calculates the number 0
Actual behavior: It frequently results in other values because one or more characters were dropped. e.g.,

>>> 123456789123456789123456789123456789123456789123456789123456789123456789%11
0
>>> 123456789123456789123456789123456789123456789123456789123456789123456789%11
0
>>> 1234567891234567891234567891234567891234567891345678923456789123456789%11
2
>>> 123456789123456789123456789123456789123456789123456789123456789123456789%11
0

The size of the USB RX buffer is 1024, same as samd, so this does NOT seem like it could be to the FIFO filling up on account of processing delays.

It's worth noting, I saw under gdb that at least with the tio terminal program the characters were received by tinyusb one at a time. I didn't ever reproduce a lost character when using the debugger to monitor the state of the rx fifo, but of course this ran much more slowly so timing-dependent weirdness could change or go away.

I feel like I filed an issue about this before but I couldn't find it. Please forgive me filing this fresh issue if it's a dup.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions