Hi Doug Baker
According to your description this seams to be a Hardware related problem, please consider that while your speed increase, your SDA and SCL lines need to be shorter, I2C need short lines because it could cause you noise and problems in the communication.
Also, could you clarify what do you mean with
Answering your questions:
Question 1: Is the expected sequence for a 2 byte I2C write followed by a three byte read?
If you ask if it is possible, then yes, there shouldn't be any problem in read 2 bytes and send 3.
Question 2: Would we ever expect to see the callback come back from the first 2 byte receive is it had not received the two bytes?
The Slave callback is set with the kI2C_SlaveReceiveEvent, so if Master is sending data, this callback will be called and inside the receive event you have to specify how many data you will save and the address of where you going to save it.
Question 3: what do we expect xfer->transferredCount to be each time we get the callback?
transferredCount is a variable that is used by the I2c to keep the count of bytes that already were transfered, in the callback you will not be able to see other value of this variable but 0. If you check I2c driver you will find the code:
/* Receive data. */
*handle->transfer.data++ = data;
handle->transfer.dataSize--;
xfer->transferredCount++;
that is called with every read in D register.
Hope this information could help you.
Have a great day,
Jorge Alcala
-----------------------------------------------------------------------------------------------------------------------
Note: If this post answers your question, please click the Correct Answer button. Thank you!
-----------------------------------------------------------------------------------------------------------------------