The RTC MCP7940N is used in the system. The microcontroller and RTC MCP7940N are connected through the I2C interface.
I would to know what is the better design to read the timer value from the RTC.
Method #1: Upon receiving the request from other high level modules, the I2C frames are prapared and sent it. The I2C data receive interrupt is used to read the I2C data and compute the time value. An event mechanism is used to inform the required modules about the availability of the new timer value
Method #2: Cyclic task is used to send the I2C frames every 5ms and the received I2C data is polled by the cyclic task to calculate the timer value. The high level modules can read the time value synchonously but the timer value will have the accuracy error of 5ms due to the fact that the RTC timer value is read every 5ms.
Please provide your views on this and the better approach to read the timer value without loading CPU much.