Thanks to visit codestin.com
Credit goes to github.com

Skip to content

rp2: Board does not enable USB after hard reset if an error is raised in boot.py. #15471

Closed
@robert-hh

Description

@robert-hh

Port, board and/or hardware

rp2, mimxrt, SAMD, but maybe other's as well

MicroPython version

MicroPython v1.24.0-preview.23.g8809ae716.dirty on 2024-07-16; Raspberry Pi Pico with RP2040

Reproduction

Just create a boot.py file, which raises an exception and push reset or do a power cycle. On Soft reset this problem does not occur. I used the following test script with the option to bypass the test:

from machine import Pin
p=Pin(2, Pin.IN, Pin.PULL_UP)
if p():
    1/0

Expected behaviour

Just boot with an exception message and bypass main.py.

Observed behaviour

Board does not register USB and seems bricked. Uploading an older firmware including v1.23.0 helps.
Just a few interim commits:
Fails with commit 8809ae7 shared/tinyusb: Buffer startup CDC data to send to host on connection.
Runs with the previous commit d144f06 lib/tinyusb: Update to the most recent master.

Additional Information

No, I've provided everything above.
@pi-anl

Code of Conduct

Yes, I agree

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions