fix(st-uart): correctly check UART enabled in flush fonction

Use tst instead of ands to check USART_CR1_UE bit is set. If not exit
the flush function.

Signed-off-by: Yann Gautier <yann.gautier@st.com>
Change-Id: Ibd2e18f6d8837073d0bbcb150e993985d3c0dd6f
This commit is contained in:
Yann Gautier 2023-06-28 17:52:08 +02:00
parent 098312edf7
commit a5273808aa

View file

@ -236,7 +236,7 @@ func console_stm32_core_flush
#endif /* ENABLE_ASSERTIONS */ #endif /* ENABLE_ASSERTIONS */
/* Skip flush if UART is not enabled */ /* Skip flush if UART is not enabled */
ldr r1, [r0, #USART_CR1] ldr r1, [r0, #USART_CR1]
ands r1, r1, #USART_CR1_UE tst r1, #USART_CR1_UE
beq 1f beq 1f
/* Check Transmit Data Register Empty */ /* Check Transmit Data Register Empty */
txe_loop_3: txe_loop_3: