2021-07-22 01:48 AM
My system is OTG capable- means it can work in Host as well as device mode.
The use case is that my system should be able to connect to mobiles and tabs where they are client devices and I should be able to charge them, also being a USB host. Also my board should be able to connect to laptop where I will be a USB client device. I have a load switch on the 5V USB output to disconnect 5V VBUS if I'm working as a USB client device and if I'm connected to a Laptop or any other USB host.
FYI, In device mode, the USB IN D+/- pins will will be connected to a USB host at other end and USB OUT D+/- pins will be connected to the onboard MCU in device mode.
I was setting control lines to 110 (SDP mode), my MCU is in USB client device mode and is connected to a laptop (USB host). the 5V USB bus is disconnected as the load switch is off. However, I don't have any USB communication happening. If I bypass STCC2540 on the board, it works like a charm. So I suspect it has something to do with STCC2540.
I understand that the SDP/CDP has to be used when the MCU connected to the STCC2540 on my board is a host. Please advice which mode in the truth table (Table5 of datasheet) should I be using if my MCU is working as a USB client-device.
Thanks in Advance