Hy Group, I have a RTC (DS1339) here in a custom ARM PXA board. The RTC is connected to the PXA over i2c an I use a i2c driver (changed ds1307 driver) to read and write the RTC registers. Kernel is 2.4.19-pxa1 plus this added own driver.
I thought it workes fine until I saw that the RTC had the time minus 12 hours: e.g. at 11:13 it showed 23:13. I use 24 hour representation.
So I thought it can be a problem with a 12h/24h flag and I set it explicit according the datasheet and I looked over the register offsets and the BCD digital code. It looked fine, again according to the data sheet.
The I saw the 12 hour shift again and watched closer: After setting the correct time I looked every hour what would happen with the time in the RTC.
- From 07:mm to 09:mm it seemed ok.
- After 09:59 it changed to 21:00, my "normal" 12 hour error
- So I corrected and set the time to 10:00 and watched...
- 10:00 worked, 11:00 worked, but
- After 11:59 it switched to 08:00, so I had a 4 hour shift.
Now I have no idea what to do.
Can anybody give me a hint what is happening? Which of the RTC registers solves this miracle? Thanks for your time.