drivers: timer: nrf_rtc_timer: Fix non tickless sys clock handling

When tickless mode was disable, sys clock timeout handler was calling
public API function for setting new compare value. Public API function
asserts when chan 0 is used which is reserved for system clock.

Signed-off-by: Krzysztof Chruscinski <krzysztof.chruscinski@nordicsemi.no>
This commit is contained in:
Krzysztof Chruscinski 2020-12-11 11:55:36 +01:00 committed by Anas Nashif
commit 4def9a386b

View file

@ -234,7 +234,7 @@ static void sys_clock_timeout_handler(uint32_t chan,
/* protection is not needed because we are in the RTC interrupt
* so it won't get preempted by the interrupt.
*/
z_nrf_rtc_timer_compare_set(chan, last_count + CYC_PER_TICK,
compare_set(chan, last_count + CYC_PER_TICK,
sys_clock_timeout_handler, NULL);
}