RTC: Fix counter value when CLEAR after STOP
If TASK_CLEAR was called after TASK_STOP the counter value would not be cleared. Fix it. Thanks to Lang Xie for the report. Signed-off-by: Alberto Escolar Piedras <alberto.escolar.piedras@nordicsemi.no>
This commit is contained in:
parent
a08acc7d3a
commit
a5a4dfdac9
|
@ -534,6 +534,7 @@ static void nhw_rtc_TASKS_CLEAR(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 = 0;
|
||||
nhw_rtc_set_counter(rtc, 0);
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue