How to Rd/Wr data from I2C device with extra opcode (ADS7142)
Posted: Fri May 10, 2024 8:11 am
We have an ESP32-S3 design using ADS7142 device from TI controlled by I2C bus.
To write or read data to or from ADS7142 registers you do not only have to transmit device address and register address but
also an Opcode for read/block read/write etc. which is an 8bit byte.
Simply spoken to read a register you need to do this sequence (acks not shown)
1. Access
Start - device address - Write bit - Wr/Rd OpCode - Register address - Stop
2. Access
Start - device address - Read bit - register data from device - Stop
We do not see a way how this can be implemented with I2C API of esp-idf (latest mater 5.2.x)
Does anybody have an idea how this can be implemented?
To write or read data to or from ADS7142 registers you do not only have to transmit device address and register address but
also an Opcode for read/block read/write etc. which is an 8bit byte.
Simply spoken to read a register you need to do this sequence (acks not shown)
1. Access
Start - device address - Write bit - Wr/Rd OpCode - Register address - Stop
2. Access
Start - device address - Read bit - register data from device - Stop
We do not see a way how this can be implemented with I2C API of esp-idf (latest mater 5.2.x)
Does anybody have an idea how this can be implemented?