Question
Unexpected triggering of HAL_UART_IRQHandler using HAL_UART_Receive_IT and HAL_UART_RxCpltCallback
Board: Nucleo-WB55
I'm attempting to continuously interrupt when data is received via UART.
The program is able to receive data when it is sent without fail, however the Rx interrupt is triggered when new data is not sent. I implement the following logic in my HAL_UART_RxCpltCallback routine:
void HAL_UART_RxCpltCallback(UART_HandleTypeDef *UartHandle)
{
strcpy((char*)command, (char*)UART1_rxBuffer);
rx_flag = 1;
HAL_UART_Receive_IT(&huart1, UART1_rxBuffer, 5);
}I call HAL_UART_Receive_IT after each complete call back so that a new receive request is ready. My methodology is clearly missing something, perhaps clearing a buffer or resetting a flag somewhere?
