2025-10-23 7:42 AM
Hi,
I am trying to create the I2C communication using the format used from the company seller of the device.
I have to follow these steps:
I2CReadFunciton ( uint8_t slAddr,
uint8_t* wrData, int wrLen,
uint8_t* rdData, int rdLen
Initiate the bus by issuing a START condition.
If there are bytes to write (wrLen > 0):
Begin the read phase:
Terminate the transaction with a STOP condition.
Key constraints:
My problem is how to not have the stop condition in the write function using the HAL functions.
Solved! Go to Solution.
2025-10-23 7:59 AM
Please include your full chip part number in your posts.
What device are you interfacing with?
HAL_I2C_Mem_Read will issue a write then a read with a repeated-start condition. Perhaps use that or look there to see how it is done.
2025-10-23 7:59 AM
Please include your full chip part number in your posts.
What device are you interfacing with?
HAL_I2C_Mem_Read will issue a write then a read with a repeated-start condition. Perhaps use that or look there to see how it is done.