Spurious IDLE LINK indication over UART2
Hi,
I'm working with STM32L151 and using 2 UART interfaces.
UART1 is configured with IDLE LINK indication and DMA for reception.
UART2 is configured without IDLE LINK indication.
I've used STMCubeMX to generate the HALs.
In the UART IQRHandler i've added the following code:
tmp_flag = __HAL_UART_GET_FLAG(huart, UART_FLAG_IDLE);
if (tmp_flag != RESET) {handle_idle_link_interrupt(huart);
}Here are the first lines of code of
handle_idle_link_interrupt():
uint8_t uart_id = (huart == &huart1) ? UART_1 : UART;
if (uart_id == UART_2)
{ g_dbg_idle_link_configured1 = __HAL_UART_GET_IT_SOURCE(&huart1, UART_IT_IDLE); g_dbg_idle_link_configured2 = __HAL_UART_GET_IT_SOURCE(&huart2, UART_IT_IDLE);assert(0);
}This code crashes - as can be seen from the above - I'm getting IDLE_LINK indication on UART2.
When i connect with the debugger i see that:
g_dbg_idle_link_configured1 = 0x10
g_dbg_idle_link_configured2 = 0x0
My question is - how come I'm getting IDLE LINK indication on UART2 which is not configured to generate this interrupt?
BTW - I'm not changing configurations on the fly. So this is not a race between configuration and interrupt generation.
Cheers.♯
#uart2-spurious-idle-link