Other Parts Discussed in Thread: TUSB322, TUSB320
Hi experts,
I have 2 questions.
If am using the TUSB322I on a prototype on the I2C bus.
1. May I ask what is the proper way to detect attach and detach of the USB C port using this part? Currently, I am triggering the MCU on the INT_N pin and checking "ATTACHED_STATE" field (bits 7-6) of register 0x09.
2. So I am doing number 1 (trigger I2C communication using INT_N, and then check "ATTACHED_STATE". However, once in a while, after I unplug it, "ATTACHED_STATE" would still read ATTACHED_SRC and VCONN_FAULT is also occurred. This then messed up the logic for my code. Please see waveforms attached:
CH1= INT_N, CH2 = VBUS, CH3 = SDA, CH4 = SCL
Normal Cycle (expected behavior) A quick type C port plug-in and unplug, VBUS comes up and down as expected
After the unplug, interrupt occurred and I read register 0x09. ATTACHED_STATE IS not attached which is expected. The 9 bits on the screenshot is 8 data bits read from 0x09 plus the NACK bit. So the read from 0x09 is 0b00110000.
Fault Cycle (unexpected behavior)A quick type C port plug-in and unplug, VBUS comes up but doesn't go down because 0x09 communication is not as expected.
After the unplug, interrupt occurred and I read register 0x09. ATTACHED_STATE is still ATTACHED_SRC which is not what I expect. The 9 bits on the screenshot is 8 data bits read from 0x09 plus the NACK bit. So the read from 0x09 is 0b01111000. Because I read ATTACHED_SRC, the sequential I2C commands from the MCU is not correct and my VBUS rail never went down.
It could just be my hardware setup as I am modifying multiple EVMs (including the TUSB322I) to test the prototype instead of using a customized PCB. However, I do want to know what could be the potential cause of this issue. There seem to be a timing issue when the TUSB322I is detecting the detach.
Thanks,
Peng