Hello.

(Sensor is TLE493D-A2B6)
The sensor I'm working on works with this protocol.
static void i2c_read_data(uint8_t slave_address, uint8_t *data, uint32_t data_len)
{
uint8_t register_address = 0x16;
i2cSetMode(i2cREG1, I2C_MASTER);
i2cSetCount(i2cREG1, data_len);
i2cSetSlaveAdd(i2cREG1, slave_address >> 1);
i2cSetDirection(i2cREG1, I2C_RECEIVER);
i2cSetStop(i2cREG1);
i2cSetStart(i2cREG1);
i2cSendByte(i2cREG1, register_address);
i2cReceive(i2cREG1, data_len, data);
/* Wait until Bus Busy is cleared */
while (i2cIsBusBusy(i2cREG1) == true)
{
asm(" nop");
}
/* Wait until Stop is detected */
while (i2cIsStopDetected(i2cREG1) == 0)
{
asm(" nop");
}
i2cClearSCD(i2cREG1); /* Clear the Stop condition */
}

I tried to send data like the one above, but it didn't I think the i2cSendByte (i2cREG1, register_address); " process is not correct.
May you help me How I get this protocol right?








