Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

RTC Fix: Clear OS bit in RTC register after low voltage condition #18

Open
wants to merge 1 commit into
base: lf-6.6.y
Choose a base branch
from

Conversation

ptonystark
Copy link

Code changes:

  • Check the oscillator stop (OS) bit during RTC initialization.
  • If the OS bit is set due to a low voltage condition (e.g., drained super capacitor), clear it to reinitialize the oscillator.

Problem study:
The oscillator stop bit of the External RTC Register must be cleared manually to make it functional.
When the RTC receives low voltage, it triggers the OS bit to be set.

Scenario:
When the super capacitor voltage is drained, the OS bit is set, indicating that the oscillator has stopped. For all subsequent initializations, this OS bit needs to be manually cleared to ensure the RTC operates correctly.

Datasheet:
rtc os bit

Setting the OC bit to zero initially to clear the old status set
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant