cancel
Showing results for 
Search instead for 
Did you mean: 

Nucleo-L475VGT6 : VCP (USART2) sends nothing – LED blinks, download OK, no garbage either

emna
Associate

Hello everyone,

I'm facing a very frustrating issue with USART2 on my Nucleo-L475VGT6 board using the built-in ST-LINK Virtual COM Port.

What works: - ST-LINK is detected (COM3 appears, Windows sound plays on connect)

- Code downloads successfully (no error in CubeIDE console)

- LED blinks (proof that main() is reached and while(1) is running)

- HAL_UART_Transmit is called 

What does NOT work:

- Nothing appears in any terminal: MobaXterm, PuTTY,  PowerShell serial reader

- No garbage, no partial characters, just black screen

- Same behavior in Run mode (no breakpoint) and after physical Reset button

MY code:

/* USER CODE BEGIN 0 */
uint8_t tx_buff[]={0,1,2,3,4,5,6,7,8,9};
/* USER CODE END 0 */

while (1)
{
 /* USER CODE END WHILE */
 
 /* USER CODE BEGIN 3 */
 HAL_UART_Transmit(&huart2, tx_buff, 10, 1000);
 HAL_Delay(10000);
}

What am I missing? Is there a jumper / solder bridge I forgot on Nucleo-L475VGT6 for VCP? Or is there a known bug with USART2 VCP on L4 series?

Thank you very much for any hint!


Edited to apply source code formatting - please see How to insert source code for future reference.

1 ACCEPTED SOLUTION

Accepted Solutions
Andrew Neil
Super User

As the others have said, make sure you're using the pins which are physically connected to the ST-Link's VCP - see the board's User Manual and/or Schematics for details.

 

CubeMX should also show which pins are connected to the ST-Link's VCP.

A complex system that works is invariably found to have evolved from a simple system that worked.
A complex system designed from scratch never works and cannot be patched up to make it work.

View solution in original post

5 REPLIES 5
TDK
Super User

> Nucleo-L475VGT6

This is not a board that exists. Perhaps you meant Nucleo-L476VGT6?

Are you using PA2/PA3?

You're sending non-ascii characters. How are you viewing them? Most terminal software will discard them. Perhaps send "Hello world\n" instead.

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

Welcome @emna, to the community!

There is no NUCLEO-L475VG, but you probably mean the B-L475E-IOT01A, which already has the status NRND (Not Recommended for New Designs). Anyway, if that's correct, the the debugger ST-LINK/V2-1 is not connected to USART2, but to USART1 (see the schematics).

Hope that answers your question?

Regards
/Peter

In order to give better visibility on the answered topics, please click on Accept as Solution on the reply which solved your issue or answered your question.
Andrew Neil
Super User

As the others have said, make sure you're using the pins which are physically connected to the ST-Link's VCP - see the board's User Manual and/or Schematics for details.

 

CubeMX should also show which pins are connected to the ST-Link's VCP.

A complex system that works is invariably found to have evolved from a simple system that worked.
A complex system designed from scratch never works and cannot be patched up to make it work.

Thank you very much for your quick replies and for welcoming me to the community

I have  installed the official ST-LINK driver , and configured PB6 and PB7 AS TX and RX PINS,

everything is stable now on USART1 . Thank you so much for your help it really guided me to check the right things in the manual and schematic.

@emna 

Please accept as solution the post that answred your original question.

Thank you

To give better visibility on the answered topics, please click on "Accept as Solution" on the reply which solved your issue or answered your question.