Resolved! Problem with UART communication functions.
All these functions have one problem, let's say in this function HAL_UART_Receive_IT(&huart4, data,5);the third parameter is the number of transmitted characters.If you enter more or less characters in the COM port of the terminal than specified in t...