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

Persist reset issue #25

Closed chegewara closed 3 years ago

chegewara commented 3 years ago

We have now added persist reset in CDC, which allows arduino IDE to enter bootload mode without need to press buttons, just like with UART. There is one small issue, which i probably not fix, but worth to mention. It is required to press upload button twice, first time to enter bootloader mode and again to start flashing. The issue is caused by 2 probably things:

To make it work with 1 time button press it is required the CDC descriptor to be exactly the same as in ESP32 S2 bootroom, which is using EP addressing i dont really like (3, 84, 85). We have not too many EP available on S2 and i prefer to have EP addresses with consecutive numbers, which makes it easier to handle and to use few classes at the same time.