How I can resume receiving data from flow controlled UART?
I'd like to know how I can resume receiving data from flow controlled
UART.
I use HAL, and I set USART2 into "flow control" with Cube MX code like as
huart2.Init.HwFlowCtl = UART_HWCONTROL_RTS_CTS;
(115200 bps, data bit 8, stop bit 1, none parity, etc. )
I start data receiving as follows,
HAL_UART_Receive_DMA(&huart2, &g_recv_char, 1);
and the 1 byte receiving is chained as follows.
void HAL_UART_RxCpltCallback(UART_HandleTypeDef *UartHandle) {
(......any processes......)
HAL_UART_Receive_DMA(&huart2, &g_recv_char, 1);
}
It works for a while (10 - 30min), but after it the data receiving is stopped. When I read RDR register with debugger, the value is changed and it is explicit correct data sent from external device.
But "HAL_UART_RxCpltCallback" func is not called.
When I manually execute "HAL_UART_Receive_DMA(&huart2, &g_recv_char, 1);" (with debugger operation), continuous data receiving is resumed.
So I guess the external device is stopped data sending, by my MCU's RTS pin.
How can I know my RTS pin status ?
Or how I can know that chained receiving process is stopped?
I use STM32L496RGT6, TM32CubeMX V5.4.0, and IAR Embedde Workbench for ARM V8.4.0 with Windows 10 PC.
Sorry for the basic question.
Thank you in advance.
