Skip to main content
Graduate
May 26, 2025
Solved

STM32 N6 FSBL USART doesn't work

  • May 26, 2025
  • 1 reply
  • 349 views

Hi,

 

I have been trying to study how to use the N657X0 Nulceo board. 

When I tried to test the USART of the board with an FSBL project, there was no print on the serial monitor, and I could not find the reason. Could somebody check what the problem is with my project? 

 

I have attached my projects below.

 

 

 

    This topic has been closed for replies.
    Best answer by RomainR.

    @HANITALY 

    To use strlen(), the string header must be added.

    #include <string.h>

    To use printf, you must also redirect stdio fputc to USART1.

    See the main.c file modified in attachment and the terminal result below using PC4 USART1_TX.

    The printf and UART Transmit are working now.

    RomainR_0-1748263090447.png

    In your code:
    PC4 USART1_TX is available on AF4
    PF12 USART1_RX is available on AF12

    PC4 is available on MORPHO connector CN3 pin #13
    PF12 is connected to Ethernet LAN8742A device on board, and it is not available on MORPHO connectors.

    If you need TX and RX you can also use PD9 USART3_RX and PD8 USART3_TX on CN15 pin #35 and #37.  

    Note: PE5 USART1_TX and PE6 USRT1_RX are also connected to embedded STLinkV3 Virtual COM Port.
    Refer to the example below:
    STM32Cube_FW_N6_V1.1.1\Projects\NUCLEO-N657X0-Q\Examples\UART\UART_Printf

    Best regards,

    Romain,

    1 reply

    RomainR.Answer
    ST Employee
    May 26, 2025

    @HANITALY 

    To use strlen(), the string header must be added.

    #include <string.h>

    To use printf, you must also redirect stdio fputc to USART1.

    See the main.c file modified in attachment and the terminal result below using PC4 USART1_TX.

    The printf and UART Transmit are working now.

    RomainR_0-1748263090447.png

    In your code:
    PC4 USART1_TX is available on AF4
    PF12 USART1_RX is available on AF12

    PC4 is available on MORPHO connector CN3 pin #13
    PF12 is connected to Ethernet LAN8742A device on board, and it is not available on MORPHO connectors.

    If you need TX and RX you can also use PD9 USART3_RX and PD8 USART3_TX on CN15 pin #35 and #37.  

    Note: PE5 USART1_TX and PE6 USRT1_RX are also connected to embedded STLinkV3 Virtual COM Port.
    Refer to the example below:
    STM32Cube_FW_N6_V1.1.1\Projects\NUCLEO-N657X0-Q\Examples\UART\UART_Printf

    Best regards,

    Romain,