Skip to content

usb_cdc.data on Macropad RP2040 #7456

Closed
@mscreations

Description

@mscreations

CircuitPython version

8.0.0-beta.4
8.0.0-beta.5
8.0.0-beta.6

Code/REPL

In boot.py:
import usb_cdc
usb_cdc.enable(console=True, data=True)

code.py:
import usb_cdc
import time

usb_cdc.data.timeout = 5.0

while(1):
    if usb_cdc.data.in_waiting > 0:
        starttime = time.monotonic()
        print(str(usb_cdc.data.read(1)))
        print(str(time.monotonic() - starttime))

Behavior

usb_cdc.data.read(1) times out (time is printed out > 5.0 seconds every time) and no data is read.

Description

When I'm trying to utilize the usb_cdc.data serial, the data.read times out rather than reading the data that is in the buffer. My testing involved, installing the version of circuit python under test, erasing the filesystem, and then changing boot.py and code.py to my test case, so it should not be remnant of old code. I have also verified this issue on multiple macro pad devices.

Additional information

I've verified this issue can be reproduced on the versions listed above. The last version that this same code works on is 8.0.0-beta.3.

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions