This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

I2C Re-Start Condition

Other Parts Discussed in Thread: TMS570LS3137

I am using the microcontroller TMS570LS3137.

I have initialized I2C module in order to use it for write/read an accelerometer´s registers through this interface.

My application needs that TMS MCU transmits a repeated start condition, but I can´t obtain it. Another important aspect is that I2C driver is working over TX and RX Interrupt on SCIOPTA RTOS.

 

The sequence that I need apply is described below:

1.- MCU to Accelerometer: Generate a Start Condition, indicate accelerometer slave address and indicate R/W bit for a write.

2.- Accelerometer to MCU: Send ACK.

3.- MCU to Accelerometer: Transmit data (address of register to read).

4.- Accelerometer to MCU: Send ACK.

5.- MCU to Accelerometer: Generate a repeated Start Condition, indicate accelerometer salve address, and indicate R/W bit for a read from the previously selected register.

6.- Accelerometer to MCU: Send ACK and data from the requested register.

7.- MCU to Accelerometer: Generate a stop condition.

I don´t know how to generate a “repeated start condition” or “restart condition”.

I would appreciate so much if someone can help me with an example, please.

Regards…