Resolved! How to handle Variable length receive data via UART?
uint8_t rx_buffer[32], rx_flag, rx_index, rx_data, RxData[32]; void HAL_UART_RxCpltCallback(UART_HandleTypeDef *huart) { if (huart->Instance==USART1) { //if the data is not being received, clear the buffer if(rx_index ==0) { for (int i=0...