This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

bq32k timeout when performing adjacent transactions



I'm having some issues with TI's RTC device (bq32k):

when trying to get the time value using hwclock, every now an again the command returns 'timeout', the exact message:

root@xxx:~# hwclock -r

hwclock: Timed out waiting for time change.

hwclock: The Hardware Clock registers contain values that are either invalid (e.g. 50th day of month) or beyond the range we can handle (e.g. Year 2095).

This message will not occur if add a small amount of delay inside driver flow.

 

I've performed some debugging sessions, and came to the conclusion that the problem lays within the RTC module, and not the i2c core. It seems that every time I perform multiple adjacent read transactions, something is getting messed up with the RTC module. This problem will not occur while performing multiple read transaction from the i2c EEPROM (and therefore I conclude that the problem is RTC related)

When adding a 30uSec delay between adjacent reads from the RTC device, everything works fine.

I read on the bq32k manual that there's a need for a 60uSec delay between the STOP condition and the next START condition (page 7, last paragraph), but then again the manual speaks about 'backup mode'... I've seen some code online that uses this delay as well - is there any chance that this delay is mandatory?

Thanks in advance,

Or