Description
CircuitPython version
Adafruit CircuitPython 9.0.0-beta.0 on 2024-01-27; Adafruit Feather RP2040 USB Host with rp2040
Code/REPL
print("hello")
Behavior
I've tested various states of powering on the microcontroller with and without the USB Keyboard plugged in to the host port and found that if the microcontroller powers up with the keyboard plugged in, the keyboard will not work until it has been unplugged and re-plugged.
I tested the following scenarios:
- start with microcontroller unplugged and USB Keyboard unplugged
- plug in the microcontroller to power
- minimal code executes and completes instantly-ish
- plug in the USB Keyboard to the USB Host port
- The keyboard works and is able to press ctrl-C and then start typing into the REPL
- Start with microcontroller unplugged from power, but with the USB Keyboard plugged in to the USB Host port
- plug in the microcontroller to power
- minimal code executes and completes instantly-ish
- The keyboard plugged in to the host port is unresponsive ctrl-C nor any other keys seem to do anything.
- Can restart the MCU multiple times with ctrl-D / ctrl-C from the keyboard plugged in to the PC and connected via tio. Still the keyboard plugged in to USB Host port is unresponsive
- Unplug the keyboard from USB Host port and re-plug it back in
- Now the keyboard plugged in to USB Host port works, ctrl-C and other key presses can be sent to interact with the REPL
Description
No response
Additional information
I noticed that there is a board.USB_HOST_5V_POWER
pin defined in this device. I attempted to use digitalio to toggle it off and back on to simulate the unplug / re-plug action but it raised an error about pin in use. I only tested from code.py but will attempt from boot.py later.
If it is possible to toggle that pin and have it serve the same purpose as unplugging and re-plugging then user code would have a way to work around this issue without needing the explicit action from the human user to unplug and re-plug.