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.

MSP432 I2C_masterSendMultiByteStart sends first byte only once

Hi!

I am right now writing a driver for an I2C LCD Display.

void LCD_sendCMD(uint8_t cmd)
{
	while (MAP_I2C_masterIsStopSent(EUSCI_B0_MODULE) == EUSCI_B_I2C_SENDING_STOP); 
	I2C_masterSendMultiByteStart(EUSCI_B0_MODULE, CBCMD);
	I2C_masterSendMultiByteFinish(EUSCI_B0_MODULE, cmd);
}

The Display needs a controlbyte which determines if the following data is a command or data. I use the driverlib function I2C_masterSendMultiByteStart which starts the communication and sends the first byte,  in this case the controlbyte for a command (CBCMD = 0x00).

I've seen on the oscilloscope that this controlbyte gets only sent the first time i call this function. The next time i call I2C_masterSendMultiByteStart it just sends the I2C address and proceeds in the code with sending the actual command via I2C_masterSendMultiByteFinish, making  it incomplete. Am i missing something here? Do I have to clear any Interruptflags or reset something so the function starts over from the beginning?

I didn't find anything regarding this in the documentation.


I am using CCS 6.1.1.00022 with an MSP-EXP432P401R rev 1.0


Jonathan

**Attention** This is a public forum