chegewara / EspTinyUSB

ESP32S2 native USB library. Implemented few common classes, like MIDI, CDC, HID or DFU (update).
MIT License
475 stars 70 forks source link

HID disconnects unless large delay() used #49

Open MadlyFX opened 2 years ago

MadlyFX commented 2 years ago

For some reason, Windows is not seeing a HIDGeneric device unless I put a large (50-100ms) delay() in my loop. Occasionally it will enumerate and immediately disconnect, or simply not be visible at all. This is with an ESP32-S2 feather,

Obviously one of the advantages of HID is the data rate, so this does seem counterproductive.

MadlyFX commented 2 years ago

Actually, it seems that I can't send or receive any data sent through HID Generic. The debug serial monitor shows that it thinks the data is sending, but no software I've tried can read the data, and I get an error when writing HID data to it as well.

jockm commented 2 years ago

Actually, it seems that I can't send or receive any data sent through HID Generic. The debug serial monitor shows that it thinks the data is sending, but no software I've tried can read the data, and I get an error when writing HID data to it as well.

I am having the same issue. And sometimes sending data causes the ESP32-S2 to reboot