mirror of
https://github.com/apache/nuttx.git
synced 2026-05-22 13:52:22 +08:00
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:
committed by
Alan C. Assis
parent
f7f769d7cd
commit
7fe0fbd9b8
@@ -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));
|
||||
|
||||
Reference in New Issue
Block a user