TCA8424EVM-038: Issues with Running HID

Part Number: TCA8424EVM-038
Other Parts Discussed in Thread: TCA8424

Tool/software:

Dear Experts,

My customer is using 

https://www.ti.com/tool/TCA8424EVM-038

together with a Linux tool (I2CTools) 

to test this the TCA directly connected to their MPU.

Its supplied with external 3V1

Then the following steps are performed: 

i2cdetect -y 1

i2ctransfer -y 1 w2@0x3b 0 0 - (ACK comes // no issue with the bus) 

Read data: 

i2ctransfer 1 w0@0x3b r30 

it receives afterwards : 

11x0x00 and 0xFF afterwards.

Thus it seems that the 11 bytes are coming from the matrix.

Usually first there should be the HID Describtor so that afterwards the areas can be addressed .

What is done wrong  here ? 

  • Hi Alex,

    It looks like the customer is attempting to read 30 bytes from the report descriptor at register address 0x3B? 

    My understanding from the commands given is that the customer is trying to read report descriptors starting at address 0x3B reading 30 bytes. It reads 11 bytes and 0xFF afterwards for another 19 bytes? 

    Please let me know if I am misunderstanding what is going wrong on the customer side. 

    Regards,

    Tyler

  • Hi Tyler, 
    Yes. The customer first detects the I2C device with address 0x3b.
    However when trying to write and read back I would assume that the i2C does the following: 

    ***********************************
    i2ctransfer 1 w0@0x3b r30  

    according to documentation

    • 1: Specifies I2C bus 1.
    • w0@0x3b: Writes 0 byte (0x00) to device with i2c address 0x3b
    • r2: Reads 30 bytes from the device.

    Thus it should read back the HID-descriptor (0x0000-0x001D) first correct ? 

     

  • Hi Alex,

    The slave address of the TCA8424 itself is shown in table 1: 

    This value is either 0x76 or 0x77. I don't see a linux command that shows that the customer is writing to the correct slave address. Is this captured in the I2C_detect or I2C_transfer function? I am not too familiar with how linux works. 

    Following the report descriptor retrieval pattern:

    Start bit 

    Slave address (0x76 or 0x77)

    Write bit

    ACK from device to Host

    Report desc reg - LSB (0x3B)

    Report desc addr - MSB (0x00)

    ACK from device to host

    repeated start

    slave address (0x76 or 0x77),

    read bit

    ACK from device to host

    read data - report desc LSB (from TCA8424 to host)

    ACK from host to device

    read data - report desc MSB

    NACK from host

    stop condition

    Given that report descriptor register address 0x3B is given, it will start reading data from that register address location. It would not start reading from 0x0000 since this was not the register address given. 0x003B was given. 

    Regards,

    Tyler

  • Hi Tyler,
    using HID we are now able to read the HID describtor:

    I2cdetect -y 1

    Device 0x3b is detected (ACK) 

    • I²C: [START – Adresse(Wr) – Index – ReStart – Adresse(Rd) – Data - Stop]

    Sent: i2ctransfer -y 1 w2@0x3b 0 0 r30
    response: 0x41 0x42 0x43 0x44 0x45 0x46 0x47 0x48 0x49 0x4a 0x4b 0x4c 0x4d 0x4e 0x4f 0x50 0x51 0x52 0x53 0x54 0x55 0x56 0x57 0x58 0x59 0x5a 0x5b 0x5c 0x5d 0x5e

    • I²C: [START – Adresse (Wr)– Index – Stop ] [Start – Adresse(Rd) – Data - Stop]
      Sent: i2ctransfer -y 1 w2@0x3b 0 0
      Sent: i2ctransfer -y 1 w0@0x3b r30
      response: 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0xff 0xff 0xff 0xff 0xff 0xff 0xff 0xff 0xff 0xff 0xff 0xff 0xff 0xff 0xff 0xff 0xff 0xff 0xff
    • I²C: [START – Adresse(Wr) – Index – ReStart – Adresse(Rd) – Data Stop][Start Adresse(RD) – Data – Stop]
      Sent: i2ctransfer -y 1 w2@0x3b 0 0 r30
      response: 0x41 0x42 0x43 0x44 0x45 0x46 0x47 0x48 0x49 0x4a 0x4b 0x4c 0x4d 0x4e 0x4f 0x50 0x51 0x52 0x53 0x54 0x55 0x56 0x57 0x58 0x59 0x5a 0x5b 0x5c 0x5d 0x5e
      Sent: i2ctransfer -y 1 w0@0x3b r30
      response: 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0xff 0xff 0xff 0xff 0xff 0xff 0xff 0xff 0xff 0xff 0xff 0xff 0xff 0xff 0xff 0xff 0xff 0xff 0xff

     

    With HID Mouse Device (ILI2510 oder ILI2511)

    Sent: i2ctransfer -y 1 w2@0x3b 0 0 r30

    • I²C: [START – Adresse(Wr) – Index – ReStart – Adresse(Rd) – Data- Stop]
      i2ctransfer -y 1 w2@0x41 0 0 r30
      response:  0x1e 0x00 0x00 0x01 0x0e 0x03 0x02 0x00 0x03 0x00 0x42 0x00 0x04 0x00 0x48 0x00 0x05 0x00 0x06 0x00 0x2a 0x22 0x01 0x00 0x11 0x10 0x00 0x00 0x00 0x00
    • I²C: [START – Adresse (Wr)– Index – Stop ] [Start – Adresse(Rd) – Data - Stop]
      i2ctransfer -y 1 w2@0x41 0 0
      i2ctransfer -y 1 w0@0x41 r30
      response:  0x1e 0x00 0x00 0x01 0x0e 0x03 0x02 0x00 0x03 0x00 0x42 0x00 0x04 0x00 0x48 0x00 0x05 0x00 0x06 0x00 0x2a 0x22 0x01 0x00 0x11 0x10 0x00 0x00 0x00 0x00
    • I²C: [START – Adresse(Wr) – Index – ReStart – Adresse(Rd) – Data Stop][Start Adresse(RD) – Data– Stop]
      i2ctransfer -y 1 w2@0x41 0 0 r30
      response:  0x1e 0x00 0x00 0x01 0x0e 0x03 0x02 0x00 0x03 0x00 0x42 0x00 0x04 0x00 0x48 0x00 0x05 0x00 0x06 0x00 0x2a 0x22 0x01 0x00 0x11 0x10 0x00 0x00 0x00 0x00
      i2ctransfer -y 1 w0@0x41 r30
      response:  0x1e 0x00 0x00 0x01 0x0e 0x03 0x02 0x00 0x03 0x00 0x42 0x00 0x04 0x00 0x48 0x00 0x05 0x00 0x06 0x00 0x2a 0x22 0x01 0x00 0x11 0x10 0x00 0x00 0x00 0x00

    Is there a reason that the HID Keyboard device always requires an I2C RE-start in between address and data communication ? 

    According to EEPROM specification this would be possible.
    Is there the possibility to exchange the Power UP default data with Valid data ? 

    Regards,
    Alex

  • Hi Tyler,

    How can the HID descriptor be changed ? 

    For example we have the HID descriptor length : 0x4041  

    But the descriptor is just 0x001D .

    In general do we have any guidance on the steps that need to be performed to run TCA8424 as HID device? 
    Regards,
    Alex

  • Hi Alex,

    I will get a response to you tomorrow by noon CST. Thanks, 

    Regards,

    Tyler

  • Hi Alex,

    Will need a little more time. 

    Regards,

    Tyler

  • Hi Alex,

    Is there a reason that the HID Keyboard device always requires an I2C RE-start in between address and data communication ? 

    You must first write the slave address (the address of the TCA8424) followed by register address according to the register mapping below: 

    You write to a specific register address because you need to set the pointer address (point to the address you want to read from). After this, a repeated start condition occurs so that you can re-issue an I2C read command to read from the register address you selected. 

    You write, repeated start, then read data from the register. 

    Is there the possibility to exchange the Power UP default data with Valid data ? 

    From my knowledge in the datasheet, it looks like all registers in table 2 accept both read and write commands. 

    You can follow the output report example for strictly writing data to a register address in table 2 to change the value of the register contents from its power up default value. 

    How can the HID descriptor be changed ? 

    Try following the output report format example, but when writing the register address - instead of writing to the output register, you would write to one of the register addresses in the HID descriptor: 0000h - 001Dh

    For example we have the HID descriptor length : 0x4041  

    What commands were sent to determine the HID descriptor length of 0x4041? 

    Regards,

    Tyler

  • Hi Tyler,

    This is achieved with the earlier described commands.

     0x41 0x42 0x43 0x44 0x45 0x46 0x47 0x48 0x49 0x4a 0x4b 0x4c 0x4d 0x4e 0x4f 0x50 0x51 0x52 0x53 0x54 0x55 0x56 0x57 0x58 0x59 0x5a 0x5b 0x5c 0x5d 0x5e

    is read from as first 30 bytes starting from address 0x0000.

    However this is also described in the HID Descriptor: 

    Can we schedule a call with ABB to aling on how to continue this as there is already some interaction going back and furth. 

    Probably a call would help to solve this issue fast.

    Regards,

    Aelx

  • Hi Alex,

    We can schedule a call. I am not as familiar with this device as it is fairly old and NRND. I can do my best to debug based off my knowledge of I2C and the datasheet. 

    Regards,

    Tyler