What Could Cause Reset of PCF8523 Breakout Board?

For RTC breakouts, etc., use the Other Products from Adafruit forum

Moderators: adafruit_support_bill, adafruit

Please be positive and constructive with your questions and comments.
Locked
User avatar
jake11212
 
Posts: 3
Joined: Sat Jun 12, 2021 4:51 pm

What Could Cause Reset of PCF8523 Breakout Board?

Post by jake11212 »

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!

User avatar
adafruit_support_carter
 
Posts: 29150
Joined: Tue Nov 29, 2016 2:45 pm

Re: What Could Cause Reset of PCF8523 Breakout Board?

Post by adafruit_support_carter »

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.

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

Re: What Could Cause Reset of PCF8523 Breakout Board?

Post by jake11212 »

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.

Locked
Please be positive and constructive with your questions and comments.

Return to “Clock Kits (discontinued)”