systick:when isr_handle is NULL will be crash.

Signed-off-by: yangguangcai <yangguangcai@xiaomi.com>
This commit is contained in:
yangguangcai 2024-10-12 21:49:25 +08:00 committed by Xiang Xiao
parent 1bba720c2f
commit 80f2890c17
1 changed files with 8 additions and 1 deletions

View File

@ -259,6 +259,13 @@ static int systick_interrupt(int irq, void *context, void *arg)
return 0;
}
#ifdef CONFIG_ARMV7M_SYSTICK_IRQ_THREAD
static int systick_isr_handle(int irq, void *regs, void *arg)
{
return IRQ_WAKE_THREAD;
}
#endif
/****************************************************************************
* Public Functions
****************************************************************************/
@ -295,7 +302,7 @@ struct timer_lowerhalf_s *systick_initialize(bool coreclk,
}
#ifdef CONFIG_ARMV7M_SYSTICK_IRQ_THREAD
irq_attach_thread(NVIC_IRQ_SYSTICK, NULL,
irq_attach_thread(NVIC_IRQ_SYSTICK, systick_isr_handle,
systick_interrupt, lower,
CONFIG_ARMV7M_SYSTICK_IRQ_THREAD_PRIORITY,
CONFIG_ARMV7M_SYSTICK_IRQ_THREAD_STACK_SIZE);