cancel
Showing results for 
Search instead for 
Did you mean: 

My Nucleo-L152Re not connected by USART2 to PuTTY

Max75
Associate II

Hello!

I try to print message from my Nucleo-L152RE board by USART2 to PuTTY, but see only black screen without symbols. On other side, my Windows 10 see Virtual COM and I can to burn the code to Nucleo board from EWARM​. What I must to do to solve this problem ?

M​y regards,

Maksim​

1 ACCEPTED SOLUTION

Accepted Solutions

That was my next thought. The code you had posted only printed if there were an error with the task initialization.

Consider also connecting the SWO pin. I usually use both USART and SWV

Tips, Buy me a coffee, or three.. PayPal Venmo
Up vote any posts that you find helpful, it shows what's working..

View solution in original post

8 REPLIES 8

>>What I must to do to solve this problem ?

You'd need to make sure the clocks, pins and peripheral are correctly configured.

Using HAL or SPL?

Hard to critique code I can't see..

Tips, Buy me a coffee, or three.. PayPal Venmo
Up vote any posts that you find helpful, it shows what's working..
Max75
Associate II

Thank you for your answer, Clive. I am using HAL. My main.c file attached below. And I'm sorry for my English, I'm study yet. :)

Max75
Associate II

I must to comment, that I have two Nucleo-L152RE boards. Into first board the code working well. But in second I have this problem - the board not print to PuTTY. I'm add second file, there are configurations of USART2.

 /* USER CODE BEGIN 2 */

 HAL_GPIO_WritePin(GPIOB, GPIO_PIN_14, GPIO_PIN_RESET);

{

char msg[] = "Hello World!";

HAL_UART_Transmit(&huart2, msg, strlen(msg), 100 );

}

...

Tips, Buy me a coffee, or three.. PayPal Venmo
Up vote any posts that you find helpful, it shows what's working..
Max75
Associate II

Yes, it's standart Hello world code. But it's not working me. On this board. The problem not in the code, it's problem or in the board, or in the communication settings from board to my notebook.​

Max75
Associate II

I'm solved it ! This board was used and solder bridges SB13 and SB14 were removed and putted to SB62 and SB63. Tomorrow I will resold it...

That was my next thought. The code you had posted only printed if there were an error with the task initialization.

Consider also connecting the SWO pin. I usually use both USART and SWV

Tips, Buy me a coffee, or three.. PayPal Venmo
Up vote any posts that you find helpful, it shows what's working..
Max75
Associate II

Thank you, Clive !​