0

What Could Cause Reset of PCF8523 Breakout Board?
Moderators: adafruit_support_bill, adafruit

Please be positive and constructive with your questions and comments.

What Could Cause Reset of PCF8523 Breakout Board?

by jake11212 on Sat Jun 12, 2021 5:28 pm

I'm working with the PCF8523 RTC breakout board in an embedded application where I need to transmit a start bit, then receive all of the info held in the clock's registry over TWI. I'm getting a strange behavior where the clock occasionally changes its registry to seemingly random numbers between 0 and 256. It seems to happen if my program is interrupted during a rx/tx event, but I couldn't find anything in the datasheet that would cause the clock to reset when a tx/rx is interrupted.

I was wondering how the PCF8523 handles crashes during tx/rx and if this could be potentially causing the reset, and if not what other events may be causing the issue so that I can guard against them.

Thanks for any help!

jake11212
 
Posts: 3
Joined: Sat Jun 12, 2021 4:51 pm

Re: What Could Cause Reset of PCF8523 Breakout Board?

by adafruit_support_carter on Tue Jun 15, 2021 11:41 am

If the interrupt is happening mid-I2C xfer, then things could get out of sorts in an unknown way. The exact nature would vary depending on the device attached. But if you were clocking out data and stopped mid xfer, the PCF may still be holding the remaining bits and waiting to clock them out again. The clock may not actually be reset. It's just that the actual data getting clocked is messed up. Can try just clocking a bunch maybe? Or just try several reads and see if it eventually reports back correctly.

adafruit_support_carter
 
Posts: 20535
Joined: Tue Nov 29, 2016 2:45 pm

Re: What Could Cause Reset of PCF8523 Breakout Board?

by jake11212 on Fri Jun 18, 2021 10:57 am

adafruit_support_carter wrote:If the interrupt is happening mid-I2C xfer, then things could get out of sorts in an unknown way. The exact nature would vary depending on the device attached. But if you were clocking out data and stopped mid xfer, the PCF may still be holding the remaining bits and waiting to clock them out again. The clock may not actually be reset. It's just that the actual data getting clocked is messed up. Can try just clocking a bunch maybe? Or just try several reads and see if it eventually reports back correctly.


Okay, thanks for the clarification. When I noticed the time errors I tried just outputting all the clock data and it seems the date resets to sometime in November 2004. I think that the data is just gibberish since this is different than the default time. I was also just outputting all the raw data so I would be able to see if the registry was just shifted or something but it didn't appear to be and didn't return to the correct time after a few polls of the info. To receive the data I have to transmit a start bit so I think maybe an interrupt causes multiple bits to be sent which starts writing in the memory. This only seems to happen occasionally and on crash so it seems fairly avoidable for the time being, thanks for the help.

jake11212
 
Posts: 3
Joined: Sat Jun 12, 2021 4:51 pm

Please be positive and constructive with your questions and comments.