arm-v7m systick:call irq_attach_thread.
Signed-off-by: yangguangcai <yangguangcai@xiaomi.com>
This commit is contained in:
parent
6b5dddd5d7
commit
62d7b3beeb
|
@ -153,3 +153,21 @@ config ARMV7M_SYSTICK
|
|||
depends on TIMER
|
||||
---help---
|
||||
Enable SysTick timer driver.
|
||||
|
||||
config ARMV7M_SYSTICK_IRQ_THREAD
|
||||
bool "attach irq by irq_attach_thread"
|
||||
default n
|
||||
depends on ARMV7M_SYSTICK
|
||||
|
||||
if ARMV7M_SYSTICK_IRQ_THREAD
|
||||
|
||||
config ARMV7M_SYSTICK_IRQ_THREAD_PRIORITY
|
||||
int "SYSTICK IRQ THREAD PRIORITY"
|
||||
default 255
|
||||
range 0 255
|
||||
|
||||
config ARMV7M_SYSTICK_IRQ_THREAD_STACK_SIZE
|
||||
int "SYSTICK IRQ THREAD STACK SIZE"
|
||||
default DEFAULT_TASK_STACKSIZE
|
||||
|
||||
endif # ARMV7M_SYSTICK_IRQ_THREAD
|
||||
|
|
|
@ -294,7 +294,14 @@ struct timer_lowerhalf_s *systick_initialize(bool coreclk,
|
|||
putreg32(NVIC_SYSTICK_CTRL_TICKINT, NVIC_SYSTICK_CTRL);
|
||||
}
|
||||
|
||||
#ifdef CONFIG_ARMV7M_SYSTICK_IRQ_THREAD
|
||||
irq_attach_thread(NVIC_IRQ_SYSTICK, NULL,
|
||||
systick_interrupt, lower,
|
||||
CONFIG_ARMV7M_SYSTICK_IRQ_THREAD_PRIORITY,
|
||||
CONFIG_ARMV7M_SYSTICK_IRQ_THREAD_STACK_SIZE);
|
||||
#else
|
||||
irq_attach(NVIC_IRQ_SYSTICK, systick_interrupt, lower);
|
||||
#endif
|
||||
up_enable_irq(NVIC_IRQ_SYSTICK);
|
||||
|
||||
/* Register the timer driver if need */
|
||||
|
|
Loading…
Reference in New Issue