Skip to main content
Visitor II
September 13, 2023
Question

UART dma rx continious communication

  • September 13, 2023
  • 2 replies
  • 1104 views

I use stm32h747 mcu  and ı want to working usart dma coninious communication. I configurated MPU and I tested basic shape, but when ı connect any devices like vn100 that time UART Over-Run interrupt occurred. my code is below. Please help me.

 

I start this like that

MODIFY_REG(USART6->RTOR, USART_RTOR_RTO, 1);

// Set CR2.RTOEN (enable Receiver Timeout):
SET_BIT(USART6->CR2, USART_CR2_RTOEN); // <- this was missing
SET_BIT(USART6->CR3, USART_CR3_EIE); // <- this was missing

// Reset RTOF flag:
WRITE_REG(USART6->ICR, USART_ICR_RTOCF);

// Set RTOIE (enable RTO interrupt):
SET_BIT(USART6->CR1, USART_CR1_RTOIE);
if (HAL_UART_Receive_DMA(this->uart_handle, p_rx_data[static_cast<uint8_t>(this->uart_module)], 10) != HAL_OK)
{
return false;
}

 

p_rx_data[static_cast<uint8_t>(this->uart_module)] is my buffer.

what can I do for this issue

    This topic has been closed for replies.

    2 replies

    Graduate II
    September 13, 2023

    Hello @Snm.1

    I think this tutorial may help you.

    Best regards.

    II

     

    Snm.1Author
    Visitor II
    September 14, 2023

    Yes, I know this and I tried But Manin problem is  UART Over-Run interrupt occurred. I dont know what is caused.

    After  UART Over-Run interrupt occurred program had entred the error callback and I could not read data. all buffer was empty.