Strictly necessary cookies are on by default and cannot be turned off. Functional, Performance and Tracking/targeting/sharing cookies can be turned on below based on your preferences (this banner will remain available for you to accept cookies). You may change your cookie settings by deleting cookies from your browser. Then this banner will appear again. You can learn more details about cookies HERE.
Strictly necessary (always on)
Functional, Performance and Tracking/targeting/sharing (default off)
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.