You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
An idea came up while I was playing with an ESP32-C3 and esp32-arduino-lib-builder to produce a package with memory protection disabled, and accidentally built for ESP32 S2/S3 too.
Although S2/S3 already have builtin USB support, this support is limited to either host or device role, but what if esp32_usb_soft_host is used along with tinyUSB acting as a device?
I chose to focus on ESP32S2/esp32_usb_soft_host alone, I don't have a broken out ESP32-S3 and tinyUSB considerations can wait.
Adapting the code was mostly adding || defined CONFIG_IDF_TARGET_ESP32S2 to #if CONFIG_IDF_TARGET_* conditional blocks and assigning pins.
However checkPins() detection fails, and now the doubt is there 🤔
Some thoughts:
not sure what value to assign to BLINK_GPIO, tried the builtin led pin, scl pin, random pins and got not change
not sure if cpu_ll_enable_cycle_count(); is needed in function usb_process(), enabling/disabling produces no change
using the makeOpcodes() from ESP32 works fine, maybe ESP32S2 wants different opcodes
(In the event the situation is realistic)
Possible use cases of an ESP32S2 using esp32_usb_soft_host/tinyUSB and acting both as host+device:
Gaming: DIY dongle for joypad/joystick auto fire + programming
well this implementation is really dirty and probably wrong on many levels but after some fiddling I had a keyboard successfully detected on an ESP32-S2
I didn't succeed at using opcodes with the S2, memory management is different and disabling memory protection wasn't enough to prevent it from crashing.
The ugly fix for the ESP32-S2 is to use a substitute for cpuDelay():
Hi and million thanks for your awesome library 👍
An idea came up while I was playing with an ESP32-C3 and esp32-arduino-lib-builder to produce a package with memory protection disabled, and accidentally built for ESP32 S2/S3 too.
Although S2/S3 already have builtin USB support, this support is limited to either host or device role, but what if esp32_usb_soft_host is used along with tinyUSB acting as a device?
I chose to focus on ESP32S2/esp32_usb_soft_host alone, I don't have a broken out ESP32-S3 and tinyUSB considerations can wait.
Adapting the code was mostly adding
|| defined CONFIG_IDF_TARGET_ESP32S2
to#if CONFIG_IDF_TARGET_*
conditional blocks and assigning pins.However
checkPins()
detection fails, and now the doubt is there 🤔Some thoughts:
BLINK_GPIO
, tried the builtin led pin, scl pin, random pins and got not changecpu_ll_enable_cycle_count();
is needed in functionusb_process()
, enabling/disabling produces no changemakeOpcodes()
from ESP32 works fine, maybe ESP32S2 wants different opcodes(In the event the situation is realistic)
Possible use cases of an ESP32S2 using esp32_usb_soft_host/tinyUSB and acting both as host+device:
So here's my question:
Is it a
xxx limitation prevents yyy feature
situation or is it worth researching further?Thanks again for creating this project, it brought hours of fun ❤️
The text was updated successfully, but these errors were encountered: