Closed silverchris closed 7 months ago
Hello @silverchris , During light sleep, the USB-OTG is clock-gated so it will not detect any USB event.
I can suggest the following:
self_powered=false
this way, the VBUS pin will not be owned by the USB driverext0/1
wakeup event.)esp_rom_gpio_connect_in_signal(GPIO_MATRIX_CONST_ONE_INPUT, USB_SRP_BVALID_IN_IDX, false);
esp_rom_gpio_connect_in_signal(GPIO_MATRIX_CONST_ZERO_INPUT, USB_SRP_BVALID_IN_IDX, false);
Awesome, that works! Thanks for the help @tore-espressif !
Answers checklist.
General issue report
Hello, I am wondering about the correct way to handle this. I am using an ESP32-S3 I have a self powered device that will be connected to a PC to transfer files to and from an SD card, and disconnected.
This works fine if I have DFS and light sleep off. But when turned on the computer can't configure the device. I have been trying to find good place to take and release a esp_pm_lock.
I have tried an interrupt on the
vbus_monitor_io
pin, but that seems to be taken over by the USB peripheral, and doesn't seem to get called.I have also tried it in the mount and premount callbacks, but that seems like it is too late.
What is the correct solution in this case?