Skip to content

rp2040-e5 feature can randomly panic if not using gpio::Pins #606

Closed
@dlkj

Description

Reproduction:

  • Enable the rp2040-e5 feature
  • Use usb::UsbBus
  • Don't use gpio::Pins

After power-on, usb operations may panic with:

ERROR panicked at 'IO Bank 0 must be out of reset for this work around to function properly.', rp2040-hal-0.8.1\src\usb\errata5.rs:36:21

Workaround

Initialise gpio::Pins

    let sio = hal::sio::Sio::new(pac.SIO);
    let _pins = hal::gpio::Pins::new(
        pac.IO_BANK0,
        pac.PADS_BANK0,
        sio.gpio_bank0,
        &mut pac.RESETS,
    );

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions