M8PD-5227 | The MSSP peripheral module produces a misleading MCC warning
notification in I2C Host mode | I2C Host Driver | User Interface fails to create a warning when there is a significant
mismatch between the calculated and requested I2C speed fields. | Verify manually in the user interface if the Requested Speed and
Calculated Speed fields match |
M8PD-5175 | For MSSP I2C mode drivers, the functions to initiate read and write
operations do not function correctly when an external interrupt occurs
during their execution | I2C Host Driver | If another unrelated interrupt occurs between the SEN bit being set
and the next line that sets the state (i2cxStatus ),
and that other interrupt's ISR is running when the SEN complete
interrupt occurs, the I2C driver will lock up the I2C bus. This issue
arises because the other ISR completes and then directly transitions to
the I2C ISR for the pending SEN complete. As a result,
I2Cx_EventHandler() gets called, but since the
state hasn't been set, it does nothing and does not complete the
transaction. Consequently, the start condition persists on the bus, and
I2Cx_IsBusy() remains busy because the "SEN" bit is
still set, leading to the I2C bus being blocked. This is not an
interrupt priority issue, as any interrupt is of higher priority than
the normal code that sets the state. | Flip the order of the two lines in both the affected functions as
defined below:
static void I2C1_ReadStart(void)
{
i2cxStatus.state = I2C_STATE_SEND_RD_ADDR;
I2Cx_StartSend();
}
static void I2C1_WriteStart(void)
{
i2c1Status.state = I2C_STATE_SEND_WR_ADDR;
I2Cx_StartSend();
}
|