STM32F769NI: How to activate USART Receiver Timeout Interrupt (USART_RTOR.RTOF)?
I want the STM32F769NI to generate an interrupt when a pause after a received byte on USART6 was detected. I am using CubeMX and configured USART6 for Asynchronous mode with 9600 baud and to enable global USART6 interrupts and use the low level drivers for USART6. In the source files I enabled the RXNE interrupt with LL_USART_EnableIT_RXNE(USART6). So far this is working, on Interrupt I can read the correct byte from USART_RDR of USART6.
I want to get an Interrupt when a pause of 100 ms is detected after a byte was received. So I configured:
LL_USART_SetRxTimeout(USART6, 960);
LL_USART_ClearFlag_RTO(USART6);
LL_USART_EnableIT_RTO(USART6);And tried to light a LED on the discovery board in the interrupt handler:
void USART6_IRQHandler(void)
{
/* USER CODE BEGIN USART6_IRQn 0 */
// Byte received:
if (LL_USART_IsActiveFlag_RXNE(USART6))
{
serialHandleRXByte(LL_USART_ReceiveData8(USART6));
}
// RX inter-bxte timeout:
else if (LL_USART_IsActiveFlag_RTO(USART6))
{
LL_USART_ClearFlag_RTO(USART6);
BSP_LED_On(LED1);
serialHandleRXTimeout();
}
/* USER CODE END USART6_IRQn 0 */
/* USER CODE BEGIN USART6_IRQn 1 */
/* USER CODE END USART6_IRQn 1 */
}The LED never lights up, I also tried to set breakpoints to check when the Interrupt handler is executed, but the interrupt is only executed when a byte is received, never after that and never with the RTO flag active.
Is there something I am missing to configure or is this feature only working in SmartCard mode? Can I use this smartcard mode for normal asynchronous bidirectional communication with 9600 baut?
