diff options
Diffstat (limited to 'stmhal/uart.c')
-rw-r--r-- | stmhal/uart.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/stmhal/uart.c b/stmhal/uart.c index 79c272bdb3..b353f5d9e3 100644 --- a/stmhal/uart.c +++ b/stmhal/uart.c @@ -35,6 +35,7 @@ #include "py/mphal.h" #include "uart.h" #include "pybioctl.h" +#include "irq.h" //TODO: Add UART7/8 support for MCU_SERIES_F7 @@ -503,7 +504,7 @@ STATIC mp_obj_t pyb_uart_init_helper(pyb_uart_obj_t *self, mp_uint_t n_args, con self->read_buf_len = args[7].u_int; self->read_buf = m_new(byte, args[7].u_int << self->char_width); __HAL_UART_ENABLE_IT(&self->uart, UART_IT_RXNE); - HAL_NVIC_SetPriority(self->irqn, 0xd, 0xd); // next-to-next-to lowest priority + HAL_NVIC_SetPriority(self->irqn, IRQ_PRI_UART, IRQ_SUBPRI_UART); HAL_NVIC_EnableIRQ(self->irqn); } |