This is an automated email from the ASF dual-hosted git repository.
acassis pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/nuttx.git
The following commit(s) were added to refs/heads/master by this push:
new 7fe0fbd9b89 uart: fix FSM check to avoid PM deadlocks
7fe0fbd9b89 is described below
commit 7fe0fbd9b8922e8efcd97f992499853a2bd049d9
Author: Thiago Finelon <[email protected]>
AuthorDate: Fri Oct 3 14:00:13 2025 -0300
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 <[email protected]>
---
arch/xtensa/src/esp32s3/esp32s3_pm.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/arch/xtensa/src/esp32s3/esp32s3_pm.c
b/arch/xtensa/src/esp32s3/esp32s3_pm.c
index 20647acd691..a801e678b01 100644
--- a/arch/xtensa/src/esp32s3/esp32s3_pm.c
+++ b/arch/xtensa/src/esp32s3/esp32s3_pm.c
@@ -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));