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.

DRV10987EVM: I2C read and write

Part Number: DRV10987EVM
Other Parts Discussed in Thread: DRV10987

Hi,

I'm using raspberry pi. I connected SDA,SCL and GND of DRV10987EVM (J3) to SDA,SCL and GND of raspberry pi. VCC 15V is given to pin1 of P1. I tried to read and write the configuration registers (0x90 to 0x96) using python program.

For writing to register, I used

slave = 0x52

bus = 1

i2c_handle = I2C.get_i2c_device(slave,bus)  

i2c_handle.write16(reg,value)

For reading, I used

length = 2

i2c_handle = I2C.get_i2c_device(slave,bus)

reg_read = i2c_handle.readList(reg,length)
return reg_read

Is this format correct ?

Thanks

- Archana

  • Archana,

    I can't comment on the raspberry pi commands.

    The slave address for DRV10987 is 0x52. The length of the data is 16 bits (so requires an 8 bit address and 16 bit data).

    Have you looked at the I2C lines on a scope to interpret the commands that are being sent to DRV10987?

    Best of luck,
    Brian