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.

unable to use psp driver package to run i2c

Hello,

I am using pspdrivers_02_20_02_01_v3 to run I2C, and I have a slave device of I2C address 0x40. I want to read an internal register within this device. This register's address is 0x11.

In the provided APIs in psp package, I found that I can define the slave device address by setting I2c_DataParam.slaveAddr, but I cannot find where I can define the address of the register I want to write/read to/from it.

In the provided example (i2cSample), the read function is disabled by #if 0, it calls Stream_write not Stream_read, and in the flags field, it defines I2c_WRITE, not I2c_READ, are these bugs or it is intention ?

Regards.

  • Ahmed,

    The slave address param is for I2C slave device address. The register address value will be passed down to I2C driver in the data buffer. You have to write the register address to the I2C slave then read the value back.

    For further support of Vision-Mid device, you should contact your local FAE.

    Regards,
    Pavel