diff --git a/include/kernel.h b/include/kernel.h index b7dad97ab34..527e6f436bd 100644 --- a/include/kernel.h +++ b/include/kernel.h @@ -932,6 +932,9 @@ extern void k_timer_start(struct k_timer *timer, * Attempting to stop a timer that is not running is permitted, but has no * effect on the timer. * + * @note Can be called by ISRs. The stop handler has to be callable from ISRs + * if @a k_timer_stop is to be called from ISRs. + * * @param timer Address of timer. * * @return N/A diff --git a/kernel/timer.c b/kernel/timer.c index c7afc111a8f..2f0c8218eb9 100644 --- a/kernel/timer.c +++ b/kernel/timer.c @@ -131,8 +131,6 @@ void k_timer_start(struct k_timer *timer, int32_t duration, int32_t period) void k_timer_stop(struct k_timer *timer) { - __ASSERT(!_is_in_isr(), ""); - int key = irq_lock(); int inactive = (_abort_timeout(&timer->timeout) == _INACTIVE);