Skip to content

Serial not reading correctly #4921

@acrankyturtle

Description

@acrankyturtle

Firmware

Adafruit CircuitPython 7.0.0-alpha.3 on 2021-06-03; Raspberry Pi Pico with rp2040

Code/REPL

import usb_cdc
import binascii

while True:
    # get serial data
    while usb_cdc.data.in_waiting > 0:
        print(binascii.hexlify(usb_cdc.data.read(256)))

Behavior

The data printed by the program does not match what I send.

Description

Any data I try to receive appears damaged or partially overwritten.

Here is a before and after of 128 bytes sent to my Pi:
image

Here is a before and after of 560 bytes sent:
image

Metadata

Metadata

Assignees

Labels

Type

No type
No fields configured for issues without a type.

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions