Skip to main content
Visitor II
April 25, 2025
Solved

STM32F732, RTO interrupt do not working

  • April 25, 2025
  • 1 reply
  • 359 views

Hi all,

I use UART8 of the STM32F732VE with 921600bps.

And I want to use UART rx dma with RTO interrupt in the following sequence.

1.

__HAL_UART_ENABLE_IT(&huart8, UART_IT_RTO)//interrupt enable

2.

huart8.Instance->RTOR = 0xff00 //set timeout 

3.

HAL_UART_Receive_DMA(&huart8, rx_buffer, RX_BUFFER_SIZE) //start rx dma

4.

void USART2_IRQHandler(void) { //create interrupt handler

 if (__HAL_UART_GET_FLAG(&huart8, UART_FLAG_RTOF)) {

 __HAL_UART_CLEAR_FLAG(&huart8, UART_CLEAR_RTOF);

 HAL_UART_RxCpltCallback(&huart8);

 }

}

but, no event is fired.

If use IDLE interrupt instead of RTO interrupt, it will work fine.

*The reference manual says that UART8 has RTO interrupt support.

What else can i do?

Many thanks for every piece of advice!

Han

    This topic has been closed for replies.
    Best answer by Hosung

    I forgot to set the RTOEN of the CR2 register.
    After configuring the CR2 register, it works properly.

    1 reply

    HosungAuthorAnswer
    Visitor II
    April 28, 2025

    I forgot to set the RTOEN of the CR2 register.
    After configuring the CR2 register, it works properly.