1 Reply Latest reply on Jan 27, 2016 9:33 AM by user_242978793

    Can't write more than two bytes to I2C..?

    lukasakerlund_1537441

      I'm trying to send 3 bytes of data to a DAC, MAX5217, trough I2C. But I can't seem so send more than 2 bytes before the communication stops.

         

      I'm doing:
                  temp = I2CM_I2CMasterWriteBuf(I2C_SLAVE_ADDRESS, (uint8 *) sample,
                                              WR_BUFFER_SIZE , I2CM_I2C_MODE_COMPLETE_XFER);

         

      With WR_BUFFER_SIZE set to 3,  but I only see the address + the first 2 bytes of my data with an oscilloscope. Setting the WR_BUFFER_SIZE to 1, sends 1 byte, anything above 1 sends 2 bytes.

         

      Any ideas?