From c3567c6f33cc521c249663c49aec7ae6a713d880 Mon Sep 17 00:00:00 2001 From: Mahesh Mahadevan Date: Thu, 24 Jun 2021 11:06:25 -0500 Subject: [PATCH] tests: arch: arm_irq_vector_table: Update to run on MXRT685 Fix for Issue#35658. Update the custom vector table to add the OS Event timer interrupt which is used on RT685 as the kernel system timer Signed-off-by: Mahesh Mahadevan --- drivers/timer/mcux_os_timer.c | 2 +- .../arm_irq_vector_table/src/arm_irq_vector_table.c | 12 ++++++++++++ 2 files changed, 13 insertions(+), 1 deletion(-) diff --git a/drivers/timer/mcux_os_timer.c b/drivers/timer/mcux_os_timer.c index fbf6ece275f..6ec70d611d9 100644 --- a/drivers/timer/mcux_os_timer.c +++ b/drivers/timer/mcux_os_timer.c @@ -24,7 +24,7 @@ static struct k_spinlock lock; static uint64_t last_count; static OSTIMER_Type *base; -static void mcux_lpc_ostick_isr(void *arg) +void mcux_lpc_ostick_isr(void *arg) { ARG_UNUSED(arg); diff --git a/tests/arch/arm/arm_irq_vector_table/src/arm_irq_vector_table.c b/tests/arch/arm/arm_irq_vector_table/src/arm_irq_vector_table.c index 3d8a0bf6a60..78c8697e6fd 100644 --- a/tests/arch/arm/arm_irq_vector_table/src/arm_irq_vector_table.c +++ b/tests/arch/arm/arm_irq_vector_table/src/arm_irq_vector_table.c @@ -230,6 +230,18 @@ vth __irq_vector_table _irq_vector_table[] = { isr0, isr1, isr2, 0, rtc_isr }; +#elif defined(CONFIG_SOC_SERIES_IMX_RT6XX) && defined(CONFIG_MCUX_OS_TIMER) +/* MXRT685 employs a OS Event timer to implement the Kernel system + * timer, instead of the ARM Cortex-M SysTick. Therefore, a pointer to + * the timer ISR needs to be added in the custom vector table to handle + * the timer "tick" interrupts. + */ +extern void mcux_lpc_ostick_isr(void); +vth __irq_vector_table _irq_vector_table[] = { + isr0, isr1, isr2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + mcux_lpc_ostick_isr +}; #else vth __irq_vector_table _irq_vector_table[] = { isr0, isr1, isr2