Having trouble with I2C interfacing...with a VEML7700 sensor
I am trying to interface with a VEML7700 light sensor. Specifically I need to generate the following request:
<start><0x10><Wr><ACK><0x04><ACK><start><0x10><Rd><ACK><8bitdata><ACK><8bitdata><ACK><NAK><STOP> where: <Wr> is a single zero bit, <Rd> is a single one bit, and things in bold come FROM the sensor.
When i use the HAL_I2C_Master_Transmit and HAL_I2C_Master_Receive calls to first transmit the <0x10><Wr><0x04> and then the receive call to request the data I end up generating:
<start><0x10><Wr><ACK><0x04><ACK><STOP><Start><0x10><Rd><ACK><8bitdata><ACK><8bitdata><ACK><STOP>
That <STOP> in the middle is killing me. How do I make the request without having the HAL_I2C_Master_Transmit generate a <STOP>? That <STOP> in the middle resets the transaction with the sensor and all I get back are zeros. I have a sensor hooked up to a Pi and I can get proper responses using i2cget but it does not insert that <STOP>.
Thanks for insights. I'm going nuts here!