Skip to main content
Max75
Associate II
July 28, 2018
Solved

My Nucleo-L152Re not connected by USART2 to PuTTY

  • July 28, 2018
  • 8 replies
  • 2916 views

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​

    This topic has been closed for replies.
    Best answer by Tesla DeLorean

    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

    8 replies

    Tesla DeLorean
    Guru
    July 28, 2018

    >>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 (See Profile) Up vote any posts that you find helpful, it shows what's working..
    Max75
    Max75Author
    Associate II
    July 28, 2018

    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
    Max75Author
    Associate II
    July 28, 2018

    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.

    Tesla DeLorean
    Guru
    July 28, 2018

     /* 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 (See Profile) Up vote any posts that you find helpful, it shows what's working..
    Max75
    Max75Author
    Associate II
    July 28, 2018

    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
    Max75Author
    Associate II
    July 28, 2018

    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...

    Tesla DeLorean
    Tesla DeLoreanBest answer
    Guru
    July 28, 2018

    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 (See Profile) Up vote any posts that you find helpful, it shows what's working..
    Max75
    Max75Author
    Associate II
    July 28, 2018

    Thank you, Clive !​