Tool/software:
Description: I'm working on a project using an i.MX6 processor and a BQ25703A charger IC, where I enable OTG mode for USB data transfer and reset OTG after the transfer is complete. The problem is that after resetting OTG, my system stops detecting USB devices when they're reinserted, and no kernel logs are generated.
Here’s what I’ve tried so far:
USB Detection Works first time when device power on
Initially, the USB devices are detected without any issues, even without enabling VBUS explicitly (i.e., before enabling OTG mode). When I enable OTG mode i.eEN_OTG = HIGH & set REG0x35[4] = 1 and perform a data transfer, the device works fine.
Issue Occurs After OTG Reset
After I reset OTG mode (EN_OTG = LOW & set REG0x35[4] = 0 ), the USB device is no longer detected and when reinserted, no kernel logs are generated. It seems like the passive detection mechanism stops working after the OTG reset.
Without OTG Reset
If I don't perform the OTG reset after data transfer, USB detection continues to work. However, the 5V supply keeps flowing to VBUS, which will consume battery.
Is there a way to reset OTG and still have USB detection work afterward, or can I stop the VBUS supply without performing an OTG reset?