Low Power RF Friends & Family,
Our customer has ran into an issue with the I2C driver. They can use the I2C driver in isolation no problem, however if they want to use it in conjunction with the UART, they appear to run into a problem where it doesn’t shutdown cleanly. If they never shut it down, it works fine, but calling I2C_close/I2C_open results in the driver getting screwed up on the second open. The problem is with the BUSBSY bit in the MSTAT register under I2C0. It should be 0 (idle) but gets stuck at 1 (busy) even though the bus is not in use. Note that the bit is 0 just prior to closing the I2C driver, the previous I2C transaction completes successfully. However on reopening the I2C driver it immediately has a BUSBSY of 1 and all transaction attempts fail immediately as a result (there is no signaling on the I2C lines at all). Trying to close and reopen the I2C driver doesn’t clear the bit either. However if the UART is closed, then the I2C will recover on the next cycle.
They have interestingly found that both the I2C and UART (also SPI) share the same power domain on the chip, apparently as long as one of them are active prevents any of the others from fully shutting down. Closing the driver then doesn’t fully shutdown the device and seems to cause problems. Also the driver interface doesn’t seem to have any sort of reset functionality that would allow the device to be cleanly reset. They haven’t yet tried direct register writes as they are concerned that could interfere with the driver.
Have we encountered this type of problem before and if so, is there a way to resolve it?
TY,
CY