This repository may give you information about how to read data on UART by using DMA when number of bytes to receive is not known in advance.
* @brief This file contains the HAL System and Peripheral (PPP) MSP initialization * and de-initialization functions. * It should be copied to the application folder and renamed into ...