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.

MSPM0L1306: MSPM0 I2C Repeated Start

Part Number: MSPM0L1306

Tool/software:

I don't think the previous example for repeated start works at all.

https://e2e.ti.com/support/microcontrollers/arm-based-microcontrollers-group/arm-based-microcontrollers/f/arm-based-microcontrollers-forum/1353654/mspm0g3507-i2c-repeated-start-condition

I tried using this method with DL_I2C_startControllerTransferAdvanced and disabling the stop.  Looking at the results on a logic analyzer, it only disables the stop at the end of the write transfer.  As soon as you start the read transfer, the controller issues a stop before it starts the read.

I also tried the DL_I2C_disableControllerReadOnTXEmpty approach.  After some experimenting, I arrived at this setup:

    // set up for repeated start

    DL_I2C_setControllerDirection(I2C_INST, DL_I2C_CONTROLLER_DIRECTION_TX); // necessary to get the address into the TX FIFO

    DL_I2C_transmitControllerData(I2C_INST, regAddr); // one byte read address setting for the write

    DL_I2C_setControllerDirection(I2C_INST, DL_I2C_CONTROLLER_DIRECTION_RX); // necessary to get ReadOnTXEmpty to stick

    DL_I2C_enableControllerReadOnTXEmpty(I2C_INST);

    DL_I2C_startControllerTransfer(I2C_INST, devAddr, DL_I2C_CONTROLLER_DIRECTION_RX, len); // len = 64, but controller only reads 2 bytes

    

This works as shown in this capture.  Two starts (green dot) not stops (orange square):

Unfortunately, it will only read two bytes.  It always NAKs the second byte and stops the transfer no mater the transfer length setting.

This is enough to get my picky I2C memory to read from a set address.  If it sees a stop it won't read at all.

I was able to work around the two byte limit by executing another read for the remaining bytes.  You can see in the capture above the second read transfer.

I don't think this is how the I2C controller is supposed to work.  Possibly I am missing a setting to configure the read length.  I tried several possiblities and never saw it read more than two bytes. 

Any ideas?