uart: fix FSM check to avoid PM deadlocks

Incorrect FSM status checks in the suspend path could cause
deadlocks when power management was enabled. This patch fixes
the condition to allow proper UART suspend/resume handling.

Signed-off-by: Thiago Finelon <thiago.sfinelon@gmail.com>
This commit is contained in:
Thiago Finelon
2025-10-03 14:00:13 -03:00
committed by Alan C. Assis
parent f7f769d7cd
commit 7fe0fbd9b8
+1 -1
View File
@@ -320,7 +320,7 @@ static void IRAM_ATTR esp32s3_suspend_uarts(void)
UART_SW_FLOW_CON_EN | UART_FORCE_XOFF);
do
{
uart_fsm = REG_GET_FIELD(UART_STATUS_REG(i), UART_ST_UTX_OUT);
uart_fsm = REG_GET_FIELD(UART_FSM_STATUS_REG(i), UART_ST_UTX_OUT);
}
while (!(uart_fsm == UART_FSM_IDLE ||
uart_fsm == UART_FSM_TX_WAIT_SEND));