Skip to content

Commit

Permalink
drivers: console: uart_mcumgr: Skip reading FIFO during setup
Browse files Browse the repository at this point in the history
Drops calling the UART FIFO read function during the setup
function (when not in async mode) which could cause issues on
some devices since this function is not called in an ISR.

Signed-off-by: Jamie McCrae <[email protected]>
  • Loading branch information
nordicjm authored and fabiobaltieri committed Nov 27, 2023
1 parent 9f1b1bb commit 1b364c1
Showing 1 changed file with 0 additions and 7 deletions.
7 changes: 0 additions & 7 deletions drivers/console/uart_mcumgr.c
Original file line number Diff line number Diff line change
Expand Up @@ -228,16 +228,9 @@ static void uart_mcumgr_setup(const struct device *uart)
#else
static void uart_mcumgr_setup(const struct device *uart)
{
uint8_t c;

uart_irq_rx_disable(uart);
uart_irq_tx_disable(uart);

/* Drain the fifo */
while (uart_fifo_read(uart, &c, 1)) {
continue;
}

uart_irq_callback_set(uart, uart_mcumgr_isr);

uart_irq_rx_enable(uart);
Expand Down

0 comments on commit 1b364c1

Please sign in to comment.