cancel
Showing results for 
Search instead for 
Did you mean: 

UART dma rx continious communication

Snm.1
Associate III

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

2 REPLIES 2
Issamos
Lead II

Hello @Snm.1

I think this tutorial may help you.

Best regards.

II

 

Snm.1
Associate III

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.