This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

TUSB320: I2C programming issue

Part Number: TUSB320
Other Parts Discussed in Thread: TPS65987, TUSB422

Hi All,

I have the TUSB320 Evaluation Module connected to a microcontroller via I2C at 400Kbits/sec.

According to the data sheet the I2C is 0x67hex when the ADDR line is pulled high. However I am not getting any ACK's from the TUSB320, even on the slave address byte, yet alone data.

I have an I2C logic analyser on the I2C bus and I am seeing correctly 0xCE address (which is 7-bit 0x67 shifted left one bit and LSB=0 for write).

I can't see why the device is not responing. Vdd320 is present and the EN# is low ..

Any idea's anyone?

Thanks

  • Bernard,

    TUSB320 should be using the slave address 0x61 in your configuration not 0x67.
  • That is strange .. the manual states 0x67 address, I will try 0x61 ..

    Actually I am not sure this chip is the correct one for my needs anyway .. 

    I thought the TUSB320 supported Power Delivery .... but it seems from comments elsewhere in the forum, that it doesn't. The datasheet was very confusing on that point as it supports Try.SNK/Try.SRC modes ..

    I need to tell a connected USB-C phone to be a host and to accept 3A charge, what TI device would be best for that senario?

    Thanks

  • Bernard,

    Could you give more detail about your system requirements? TPS65987 may be an alternative solution for what you have described.
  • Hi Malik,

    My requirments are as follows:

    We have a USB-C phone connected to a USB2 GPS receiver, the Phone needs to be a Host as the receiver is device only. However we need to charge the phone from an external supply at the same time USB connection is going on. This requires the phone to be negotiated to Host/Sink mode, and we need 3A charge.

    Is the chip you suggested best for that? And is it easy to program to setup that mode? (we have limited space in the micro we use). Would the TUSB422 be a cheaper option as we already have a power switch and VBUS monitoring from our micro.

    We will have I2C interface to the chip as required ..

    Regards,

    Bernard

  • Benard,

    It looks like TUSB320 can negotiate for 3A charging current for Type C applications, section 7.2.2 Type-C Current Mode, so it should be suitable for your needs unless you need to negotiate higher power over Type-C. It can also operate as a UFP which is needed for your application assuming TUSB320 will be on the USB2 GPS receiver board and not the USB type-C phone.

  • Thanks for that .. great.

    Can you give some advice on the necessary registers to write to to negotiate(force) the attached phone into DFP+Current sink mode?

    (.. and yes, the TUSB420+GPS will be a UFP and supplying charge current to the phone)

    At the moment I have the Eval board to experiment with .. and an attached micro to the I2C lines .. 

    Cheers

  • Benard,

    After some review, TUSB320 should be configured as a DRP instead of UFP so the type-c phone (should be DRP) handshakes and sees the 3A charging advertisement. Try these register values below for DRP configuration with 3 A current mode advertised. 

    I2C Regs:

    0Ah [5:4] MODE_SELECT = 11

    08h [7:6] CURRENT_MODE_ADVERTISE = 10

    TUSB320 does not control charging other than advertising the charging current and cannot force the type-c phone into Current Sink mode. 

    For more information on this section 4.8.4 Sourcing Device in USB Type-C spec version 1.3.

  • Thanks.

    But begs the question: How do I ensure the Phone is a Host in while it is sinking current, won't it try to switch to a device if it sees charging current advertised?

    Also in the above register (0Ah) should I not be hitting the SOURCE_PREF [2:1] bits to 11 (Try.SRC), from what you say above you "cannot force" the phone, but isn't this designed to do just that?

    To try this out on the EVM board REVB with external power supplied, is there anything else I should be doing to the board to support this mode? (I have SW1 and 5 on, LED3 lights up when phone connected)

    Sorry for all the questions.

    Cheers,

    Bernie

    EDIT:

    I have the following code:

    // TUSB320 Setup
        i2c_data[0] = 0x0a;         // CSR Register
        i2c_data[1] = 0x37;         // Set DISABLE_TERM and DRP mode, and Try.SRC
        i2cPtr->write(addr8bit,i2c_data,2,false); 
        
        wait_ms(10);
        
        i2c_data[0] = 0x0a;         // CSR Register
        i2c_data[1] = 0x36;         // Clear DISABLE_TERM
        i2cPtr->write(addr8bit,i2c_data,2,false); 
        
        i2c_data[0] = 0x08;         // CSR Register
        i2c_data[1] = 0x80;         // Advertize 3A
        i2cPtr->write(addr8bit,i2c_data,2,false);

    However, the Phone only charges at 500mA and stays in device mode ..

    I can confirm that the chip ACK's every byte sent ..

  • Bernie,

    I was mistaken in my previous posts. In order to achieve the desired functionality a power role swap function is needed and the GPS device port must be a UFP. Power role swap will keep the Type C phone as the host and GPS device slave while the Type C phone is sourcing power from the GPS device. TUSB320 does not support Power Role Swap. TUSB422 does support Power Role Swap, see section 7.4.3 Power Role Swap and UFP see section 7.3.4 UFP (Upstream Facing Port). Using a UFP configuration will ensure the correct orientation for data transfer (i.e. Type C phone as DFP, host)