Closed dicristina closed 11 months ago
Such an extensive review! I think this is what we are expected to do for TinyUSB. I will merge it here first, but will consider propagating it further to ice_usb_init()
.
Thank you for the fix!
Indeed, the expected way is to skip everything until enumeration is there. https://github.com/raspberrypi/pico-examples/blob/master/usb/device/dev_hid_composite/main.c#L108
This got incorporated into the new release, along with other fixes. Thank you for this patch! https://github.com/tinyvision-ai-inc/pico-ice/releases/tag/pico-ice-default-v1.5
The pico-ice board does not appear as an USB device on macOS with default firmware versions 1.3 and 1.4. The logs indicate that USB enumeration fails:
The tests were done on an M2 MacBook with macOS 14.1.
This was introduced with commit 5f37b79. The problem is that the delay in the main loop causes the RP2040 to send a lot of
NAK
responses and the Mac host gives up on the enumeration. I reproduced the same situation with the dev_hid_composite example by adding asleep_ms(100)
in the main loop. A solution is to ensure that USB enumeration has completed before going into the main loop: