amigahid-pico icon indicating copy to clipboard operation
amigahid-pico copied to clipboard

USB device enumeration occasionally silently fails

Open borb opened this issue 2 years ago • 1 comments

Sometimes, USB device enumeration does not occur on powerup. This event is usually silent, and no interrupt or assertion is raised by tinyusb. Unplugging and replugging USB devices has no impact on further enumeration and the hid-pico device needs to be power cycled (since there is no software reset trigger present) in order to restart the device and the USB stack.

Consider some form of watchdog event, e.g. if no devices are enumerated within 10s of initial startup, perform a device reset to attempt to trigger the stack to get into a usable state. Resetting the hid-pico software should have no impact on the host Amiga since the GPIO state will be retained during reset - all GPIO pins are set to input, open-drain with pullups disabled so won't accidentally assert reset in a restart situation.

borb avatar Sep 07 '23 10:09 borb

the first (and simpler) workaround can be taking the rp2040 RUN pin and attaching it to a PCB switch button so it does not need any firmware modification

Chandler-Kluser avatar Sep 08 '23 15:09 Chandler-Kluser