Don't enable RTC clock on speed change if RTC timer not enabled. Fixes crash when changing configuration with XT models.
This commit is contained in:
parent
c876f1376d
commit
58e42fda81
1 changed files with 5 additions and 0 deletions
|
|
@ -65,6 +65,11 @@ void nvr_recalc()
|
|||
{
|
||||
int c;
|
||||
|
||||
if (!(nvrram[RTC_REGA] & RTC_RS))
|
||||
{
|
||||
timer_disable(&rtc_timer);
|
||||
return;
|
||||
}
|
||||
c = 1 << ((nvrram[RTC_REGA] & RTC_RS) - 1);
|
||||
timer_set_delay_u64(&rtc_timer, (uint64_t)(RTCCONST * c));
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue