Skip to content

Print read value from UART in a loop leads to crash bug #5477

@python36

Description

@python36

CircuitPython version

Adafruit CircuitPython 7.0.0 on 2021-09-20; Teensy 4.1 with IMXRT1062DVJ6A
Board ID:teensy41

Code/REPL

import busio
import board

ser = busio.UART(board.D20, board.D21, baudrate=115200)

for i in range(20):
  print(ser.read(1))

Behavior

Auto-reload is on. Simply save files over USB to run them or enter REPL to disable.
code.py output:
b'%'
b'\xbe'
b'\x1f'
Traceback (most recent call last):
  File "code.py", line 7, in <module>
NameError: name 'ser' is not defined

Code done running.```

### Description

Print read value from UART in a loop leads to crash bug or re-initializating of the board.

### Additional information

_No response_

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugcrashmimxrt10xxiMX RT based boards such as Teensy 4.x

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions