RTC: Fix for TASKS_TRIGOVRFLW with stopped counter
nhw_rtc_TASKS_TRIGOVRFLW() was assuming the task would only be called if the timer is running, but that is not correct. The timer may be stopped. Let's fix it. Signed-off-by: Alberto Escolar Piedras <alberto.escolar.piedras@nordicsemi.no>
This commit is contained in:
parent
c8fd53aab0
commit
123d37db9c
|
@ -547,6 +547,7 @@ static void nhw_rtc_TASKS_TRIGOVRFLW(uint rtc) {
|
|||
|
||||
/* Pre-scaler value is latched to an internal register on tasks START, CLEAR, and TRIGOVRFLW */
|
||||
nhw_rtc_st[rtc].PRESC = NRF_RTC_regs[rtc].PRESCALER;
|
||||
nhw_rtc_st[rtc].counter_at_stop = RTC_TRIGGER_OVERFLOW_COUNTER_VALUE;
|
||||
nhw_rtc_set_counter(rtc, RTC_TRIGGER_OVERFLOW_COUNTER_VALUE);
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue