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.

reading the TUSB320 I 2 C registers

Other Parts Discussed in Thread: TUSB320, TUSB320HAI

Hello Team,


I have a customer who has questions regarding the steps required to read the i2c registers of the TUSB320 stated on page 14 of the datasheet

" For Reading of these address I do not fully understand the Steps 1-6 as written.

Step 1: which ADDR do I use, From Table-5? Or table 7?   I believe this is referring to table 5?

Step 2: understood.

Step 3: what does this mean?  The sub-address is referring to the register address that you want to read/write ?

Step 4: ok

Step 5: Do I just keep reading the remaining DEVICE _ID’s w/o having to set the next ADDR.

Step 6: Understood,

Followed by the NOTE :  If no sub-addressing is included for the read procedure, then the reads start at register offset 00h and continue byte-by-byte through the registers until the I 2 C master terminates the read operation. If a I 2 C address write occurred prior to the read, then the reads start at the sub-address specified by the address write -- What does this exactly mean?

One last question : Is START/STOP condition initiated with a WRITE? "

Thank you for your time and attention towards this post.

Sincerely,

Kishen

  • Hello Team,

    Is there any suggestions to the above questions.

    Thank you for your attention and time towards this post.

    Sincerely,

    Kishen
  • Hello Kishen,

       I am sorry for the delay, and here you go my feedback:

       STEP 1. You are correct, it is referring to the table 5 (the actual I2C device address).

       STEP 3. It is the register address.

       STEP 5. The TUSB320 automatically increments its register's pointer after each reading/writing operation, so the master is capable to continuously read/write the next register without update the address..

       NOTE: it means that if you write lets say the address 0x08, then if you read a register without sending any sub-address, then you will read the address 0x09, instead of 0x00 because the register's pointer was previously on 0x08 due to the writing operation.

      The Start/Stop conditions are set accordingly the I2C standard, at the very beginning and end of  each transmission. Here you go an example using an AArdvark I2C controller (This example is for the TUSB320HAI, for TUSB320 you only have to change the I2C address):

    Regards,

    Diego.

  • Hi Diego,

    Thank you for your assistance. I appreciate it.
  • Hello Diego,

    The customer came back today with a few follow ups. Please review it below:

    " All I want to do is verify Device ID.

    Ok, let me see if I got this! With ACK at each step.

    A] Write too “I2C”   ADDR [x60 or X61] does it matter?

    B] Write to “Device ID, Register No.”    ADDR [00x] first ID code “T”

    C] Read to ADDR [00x]

    D] Read the register, “T”

                           --- Repeat reading [I am assuming I do NOT have to set up the NEXT ADDR

                               [pointer will keep indexing to next x01  x07 address] as we talked about below.

    E] Read the Resister, “U”

    Read the Resister, “S”

    Read the Resister, “B”

    Read the Resister, “3”

    Read the Resister, “2”

    Read the Resister, “0”  

     

     Again thank you for your assistance on making this more clear to the customer.

    Sincerely,

    Kishen

  • Kishen,

       Here is my feedback:

       A) Yes, it matters and depends on how you configure the ADDR pin (Low or High)

       B) that's correct, you don't have to increment the register address because it is done automatically by the TUSB320.

    Regards,

    Diego.