2023-09-13 05:54 AM
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
2023-09-13 06:07 AM
2023-09-13 09:55 PM
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.