Skip to content

Commit

Permalink
esp32s3: don't clear pending interrupts on eg. up_putc
Browse files Browse the repository at this point in the history
  • Loading branch information
yamt committed Nov 20, 2024
1 parent c3f4f4c commit 41571b8
Showing 1 changed file with 10 additions and 2 deletions.
12 changes: 10 additions & 2 deletions arch/xtensa/src/esp32s3/esp32s3_lowputc.c
Original file line number Diff line number Diff line change
Expand Up @@ -825,9 +825,17 @@ void esp32s3_lowputc_disable_all_uart_int(struct esp32s3_uart_s *priv,

putreg32(0, UART_INT_ENA_REG(priv->id));

/* Clear all ints */
/* Note: this function is used to disable interrupts temporarily,
* paired with esp32s3_lowputc_restore_all_uart_int. (eg. up_putc)
* In that case, it might not be safe to clear interrupt bits.
*/

if (current_status == NULL)
{
/* Clear all ints */

putreg32(0xffffffff, UART_INT_CLR_REG(priv->id));
putreg32(0xffffffff, UART_INT_CLR_REG(priv->id));
}

spin_unlock_irqrestore(&priv->lock, flags);
}
Expand Down

0 comments on commit 41571b8

Please sign in to comment.