cancel
Showing results for 
Search instead for 
Did you mean: 

NUCLEO-F030R8, Virtual Com Port

YLu.1
Associate

Purpose: try to print "hello world" .

Status: VCP shown in Device Manager as COM3. Putty can connect. Nothing displayed, tried other serial port debug tool. No success.

simple code, except HAL_UART_Transmit, all others are auto-generated by CubeIDE. UART2 is supposed to connect to ST_LINK directly by default and then the Host. Any idea?

 /* Initialize all configured peripherals */

 MX_GPIO_Init();

 MX_USART2_UART_Init();

 MX_TIM17_Init();

 /* USER CODE BEGIN 2 */

 HAL_TIM_PWM_Start_IT(&htim17,TIM_CHANNEL_1);

 /* USER CODE END 2 */

 /* Infinite loop */

 /* USER CODE BEGIN WHILE */

 while (1)

 {

  /* USER CODE END WHILE */

  /* USER CODE BEGIN 3 */

 HAL_Delay(200);

 HAL_UART_Transmit(&huart2,data,sizeof(data),0xFFFF);

 }

 /* USER CODE END 3 */

}

1 REPLY 1
TDK
Guru

Check that the pins are initialized correctly. Check clock settings. The issue is probably one of those two things.

If you feel a post has answered your question, please click "Accept as Solution".