HAL_UART_Init() bug for more than one UART setting
I am working on a LoRaWAN and GNSS project. I have found one inconsistent operation when try to configure UART1 for GNSS connection. UART2 is used as PRINTF for logging.
Procedure to produce bug:
- Use I-CUBE-LRWAN example as the codebase.
- Add code from X-CUBE-GNSS into the project.
- Call GNSS_UART_Init().
Effect of bug:
- PRINTF() not work.
- UART1 is not configured.
I have tracked down to the code of HAL_UART_Init() and found that a single HAL_UART_MspInit() callback is invoked for any UART. Since the HAL_UART_MspInit() function is provided in the vcom.c so this caused the bug.
