主权项 |
1. A method for data communication within an inter-integrated circuit (I2C) system that includes a master module, an I2C bus and a slave module, the method comprising the steps of:
a) transmitting, by the master module, data to the slave module via the I2C bus; b) generating, by the master module, a communication error code indicative of error status when data transmission from the master module to the slave module in step a) fails; c) determining, by the master module, whether to retransmit the data to the slave module according to the communication error code generated in step b); d) when the determination made in step c) is affirmative, determining, by the master module, whether a number of time(s) of data retransmission associated with the data from the master module to the slave module reaches a predetermined number; e) when the determination made in step d) is affirmative, resetting the master module; and f) after step b), recording, by the master module, a communication error event according to the communication error code. |