diff --git a/boards/arm/stm32/viewtool-stm32f107/src/stm32_highpri.c b/boards/arm/stm32/viewtool-stm32f107/src/stm32_highpri.c index 07c1c5262a1..c095fc32844 100644 --- a/boards/arm/stm32/viewtool-stm32f107/src/stm32_highpri.c +++ b/boards/arm/stm32/viewtool-stm32f107/src/stm32_highpri.c @@ -103,6 +103,11 @@ static struct highpri_s g_highpri; * Private Functions ****************************************************************************/ +static inline_function bool is_nesting_interrupt(void) +{ + return up_current_regs() != NULL; +} + /**************************************************************************** * Name: tim6_handler * @@ -128,7 +133,7 @@ void tim6_handler(void) /* Check if we are in an interrupt handle */ - if (up_interrupt_context()) + if (is_nesting_interrupt()) { g_highpri.handler++; }