What is the right way to disable the I2C module after the I2C transmission is completed for FCR4 MCUs?
If the I2C module has to be disabled after a transmission, it is necessary to give time to the module to reach the idle state. There is a bit flag in the register I2Cn_IBCSR called BB (Busy Bit) that is ‘1’ while the communication is in progress and ‘0’ when the communication is ended and the module is in idle state. So the user must check this Busy Bit to ensure that the module is in idle state, and then disable the module.
- The program flow is as follows:
- Generate the I2C start condition.
- Issue read/write I2C commands.
- Generate the I2C stop condition.
- Wait until BB is 0.
- Disable the I2C module.
Disabling the I2C module is not necessary for normal I2C operation.