From 658f81b7921cbe776ddac03f191675b8ef3a7bb0 Mon Sep 17 00:00:00 2001 From: me-no-dev Date: Tue, 11 Oct 2016 11:16:43 +0300 Subject: [PATCH] attach uart isr on the current core --- cores/esp32/esp32-hal-uart.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/cores/esp32/esp32-hal-uart.c b/cores/esp32/esp32-hal-uart.c index d589f046..25547991 100644 --- a/cores/esp32/esp32-hal-uart.c +++ b/cores/esp32/esp32-hal-uart.c @@ -90,7 +90,7 @@ uart_t* uartBegin(uint8_t uart_nr, uint32_t baudrate, uint32_t config, int8_t rx pinMode(uart->rxPin, INPUT); pinMatrixInAttach(uart->rxPin, UART_RXD_IDX(uart->num), uart->inverted); - intr_matrix_set(APP_CPU_NUM, UART_INTR_SOURCE(uart->num), UART_INUM(uart->num)); + intr_matrix_set(xPortGetCoreID(), UART_INTR_SOURCE(uart->num), UART_INUM(uart->num)); xt_set_interrupt_handler(UART_INUM(uart->num), _uart_isr, uart); ESP_INTR_ENABLE(UART_INUM(uart->num)); conf1 = (112 << UART_RXFIFO_FULL_THRHD_S) | (0x02 << UART_RX_TOUT_THRHD_S) | UART_RX_TOUT_EN;