printf causes terminal to stay just empty.
Hey. I tried to setup `printf` using the following forum post. I am using the `NUCLEO-L4A6ZG`.
Here what I've tried so far. I connected the `USART2` to the Pins `PA2` (RX) and `PA3` (TX):
(By default LPUART1 was configured and connected to PG7/8, since the forum post used USART2 I used it as well.)

After the configuration was saved, and the code generated, I used the code from the previous mentioned forum post. Here a shorter and with comments removed version:
/* Includes ------------------------------------------------------------------*/
#include "main.h"
#include "stdio.h"
// ...
/* Private variables ---------------------------------------------------------*/
UART_HandleTypeDef huart2;
// ...
/* Private function prototypes -----------------------------------------------*/
void SystemClock_Config(void);
static void MX_GPIO_Init(void);
static void MX_USB_OTG_FS_PCD_Init(void);
static void MX_USART2_UART_Init(void);
/* USER CODE BEGIN PFP */
#define PUTCHAR_PROTOTYPE int __io_putchar(int ch)
/* USER CODE END PFP */
// ...
int main(void)
{
HAL_Init();
SystemClock_Config();
MX_GPIO_Init();
MX_USB_OTG_FS_PCD_Init();
MX_USART2_UART_Init();
while (1)
{
/* USER CODE END WHILE */
printf("Hello, World!\n\r");
HAL_Delay(1000);
/* USER CODE BEGIN 3 */
}
}
// ...
static void MX_USART2_UART_Init(void)
{
huart2.Instance = USART2;
huart2.Init.BaudRate = 115200;
huart2.Init.WordLength = UART_WORDLENGTH_7B;
huart2.Init.StopBits = UART_STOPBITS_1;
huart2.Init.Parity = UART_PARITY_NONE;
huart2.Init.Mode = UART_MODE_TX_RX;
huart2.Init.HwFlowCtl = UART_HWCONTROL_NONE;
huart2.Init.OverSampling = UART_OVERSAMPLING_16;
huart2.Init.OneBitSampling = UART_ONE_BIT_SAMPLE_DISABLE;
huart2.AdvancedInit.AdvFeatureInit = UART_ADVFEATURE_NO_INIT;
if (HAL_UART_Init(&huart2) != HAL_OK)
{
Error_Handler();
}
}
// ...
/* USER CODE BEGIN 4 */
PUTCHAR_PROTOTYPE {
HAL_UART_Transmit(&huart2, (uint8_t *)&ch, 1, 0xFFFF);
return ch;
}
/* USER CODE END 4 */
Then I build it, created the Debug-Profile and ran/resumed it via the Debug-Mode.
I wanted to connect via PuTTY. I turned Flow Control off, and set the data bits to 7. Here are the settings:

When I select open I can connect, but the terminal stays just empty.
I not sure where the problem is. I would be very grateful if someone could help me.

