Skip to main content
Visitor II
July 21, 2020
Question

Nucleo l152RE virtual com port not work

  • July 21, 2020
  • 1 reply
  • 1725 views

I have my Nucleo l152RE board i want send and receive small data using vpc , then i use cdc configuration then my program :

 MX_GPIO_Init();

 MX_USART2_UART_Init();

 MX_USB_DEVICE_Init();

 /* USER CODE BEGIN 2 */

 /* USER CODE END 2 */

 /* Infinite loop */

 /* USER CODE BEGIN WHILE */

 while (1)

 {

  /* USER CODE END WHILE */

  /* USER CODE BEGIN 3 */

  HAL_Delay(1000);

  uint8_t buffer[] = "Hello, World!\r\n";

  CDC_Transmit_FS(buffer, sizeof(buffer));

  HAL_Delay(1000);

   

   

   

 }

Im using just a cable usb connected to CN1 i have Sb63 e sb62 OFF , when i run my code in my device on Windows 10 I see just Stilink virtual port COM7 , and on tera term i don't see nothing , I Have tried to interface another usb cable interfaced to pa11 , pa12 gnd and 5 V but also in this case I dont see nothig .

Can help me.

Thanks

Francesco

    This topic has been closed for replies.

    1 reply

    Visitor II
    August 5, 2020

    Hello.

    Have you got this error "../Src/main.c:126:2: warning: implicit declaration of function 'CDC_Transmit_FS' [-Wimplicit-function-declaration]"?

    If yes, then try "#include "usbd_cdc_if.h"" in section "/* USER CODE BEGIN Includes */"