2023-07-21 06:50 AM - edited 2023-07-21 06:52 AM
Hello,
I'm using a STLINK-V3MODS in a test and programming interface that I realized.
Currently I use the bridge API to manage I2C, interface through a software written in Cpp on Qt platform.
I need to perform a reading procedure without sending a STOP condition after the write command to select the register that i want to read.
I cannot find a good sequence of command to achieve that.
I`m now trying with the follow command:
Brg_StatusT Brg::StartWriteI2C(const uint8_t *pBuffer, uint16_t Addr, Brg_I2cAddrModeT AddrMode, uint16_t SizeInBytes, uint16_t *pSizeWritten)
Which should only send:
Master mode I2C transaction is splitted: only (re)start- addr- data are sent (no stop).
But i cannot launch a read command later:
Brg_StatusT Brg::ReadI2C(uint8_t *pBuffer, uint16_t Addr, uint16_t SizeInBytes, uint16_t *pSizeRead)
Because the communication times out during write command and the ninth clock is not sent to receive the acknowledge.
There's a way to send a:
START ADDRESS (ack) DATA (ack) START ADDRESS (ack) data ....
sequence?