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

Fixed crash on cold RTC boot #130

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open

Conversation

thinkier
Copy link

Added checks before writing external RTC time to Pico's time to prevent error-crash when the enviro board is booted from a cold RTC.

@ZodiusInfuser
Copy link
Member

Hi. Do you have more details of the crash you experienced? From a cold boot the RTC does have a time (though out by 2 years), so shouldn't cause a crash when being applied to the Pico's RTC.

@thinkier
Copy link
Author

When I unboxed my enviro urban, the dRTC kept trying to set the time on the Pico's RTC to something in 2001 and immediately crashes. This fix attempts to fetch NTP time if the dRTC is ridiculously off (as defined by an existing function; where the dRTC reports the year to be 2020)

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.

2 participants