I use a BQ24195 chip as a charger. The datasheet is available here:
I need to identify if the USB is connected and if it is connected, in which of the following modes is it adjusted?
- SDP (Standard downstream port)
- CDP (Charging downstream port)
- DCP (Dedicated charging port)
Detecting USB seems easy. I can use the condifion
if (REG8[7,6] == 01)
according to page 32.
But, I have no clue how to detect
DCP? Reading from or writing to the
D+/D- is crazy. I cannot tell the program to wait some milliseconds in real-time to check a timeout. While, I expect the BQ24195 chip detects it by its own. Does it do that? If it does, how to detect it (without any delay in the processor codes)?
Note: There is a DCD (Data Contact Detection) in page 13 of the manual. But, I do not understand, if this is what the chip does for us or this is what they expect out code does (e.g. via blocking the application)?