RTC assert fails without RTC plugged in
richarthurs opened this issue · 2 comments
richarthurs commented
The convertBCD function uses an assert to work correctly. Therefore, when the RTC is broken or not plugged in, the assert will crash the system.
richarthurs commented
Todo:
- redo convertBCD without using an assert. If it is trying to convert 0 data, it should fail gracefully (and eventually log an error once we get that going)
- note that the years register uses a weird BCD style, so rtc_get_year() should be redone so that it decodes the year correctly. [manual page 14]
Manual:
http://www.abracon.com/realtimeclock/AB-RTCMC-32.768kHz-EOA9-S3-Application-Manual.pdf
Relevant files:
sfu_rtc.c, sfu_rtc.h
victormleon commented
Branch victor/convertBCD-28
made for this issue.