cancel
Showing results for 
Search instead for 
Did you mean: 

STLINK-V3MODS - Brigde - I2C - Restart condition

ATPG
Associate II

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.

ATPG_0-1689947033379.png

ATPG_1-1689947400037.png

There's a way to send a:
START ADDRESS (ack) DATA (ack) START ADDRESS (ack) data .... 

sequence?

 

 

0 REPLIES 0