1 Known Issues for the MCC Melody TWI PLIB Driver v7.1.6

Table 1-1. List of known issues in the TWI v2 driver.
IssueIssue TitleAffected implementation(s)Issue DescriptionWorkaround
M8PD-12558The TWI host driver causes the I2C bus to lock up due to bus collisions on a TWI bus with multiple clientsHost DriverThe issue involves bus collisions when multiple I2C client devices are connected on the same I2C bus. The I2C host driver fails to report the bus collision error and instead indicates that the bus is busy indefinitely. Upon investigation, it was found that the driver performs certain unsafe read-modify-write operations on special registers like MSTATUS, particularly when clearing status or interrupt flags.The following points summarize the necessary fixes:
  • Avoid using Or-Equals (|=) to clear bits in the MSTATUS register
  • Remove all instances in the code that are attempting to clear RXACK flag
  • Replace all group configurable lines of code according to suggestions listed below:

Replace usages of |= or &= like

TWIx.MCTRLB |= TWI_MCMD_RECVTRANS_gc

in the code with a combination of bit wise AND and OR to ensure only the intended bits are modified:

For example:

TWIx.MCTRLB = (TWIx.MCTRLB & ~TWI_MCMD_gm) | TWI_MCMD_RECVTRANS_gc;