diff options
Diffstat (limited to 'stmhal/pendsv.c')
-rw-r--r-- | stmhal/pendsv.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/stmhal/pendsv.c b/stmhal/pendsv.c index f374e06fdf..fb66a3dad4 100644 --- a/stmhal/pendsv.c +++ b/stmhal/pendsv.c @@ -30,6 +30,7 @@ #include "py/mpstate.h" #include "py/runtime.h" #include "pendsv.h" +#include "irq.h" // This variable is used to save the exception object between a ctrl-C and the // PENDSV call that actually raises the exception. It must be non-static @@ -40,7 +41,7 @@ void *pendsv_object; void pendsv_init(void) { // set PendSV interrupt at lowest priority - HAL_NVIC_SetPriority(PendSV_IRQn, 0xf, 0xf); + HAL_NVIC_SetPriority(PendSV_IRQn, IRQ_PRI_PENDSV, IRQ_SUBPRI_PENDSV); } // Call this function to raise a pending exception during an interrupt. |