AN4989 Rev 3
69/118
AN4989
Printf debugging
117
7.2
Printf via UART
Direct connection from PC UART to board pinout does not work due to signal level
incompatibility.
Take care to use external adapter (such as MAX232, ST3241EB, FTDI USB/UART) or the
USART connected to Virtual COM port.
Trick:
Appendix B: Use Nucleo “cuttable” ST-LINK as stand-alone VCP on page 106
explains how to use ST-LINK Nucleo stand-alone part as VCP.
The straight-forward way to set a Serial Com port with PC host is to use the USART
connected to VCP.
USART connected to VCP depends on the hardware kit:
•
Nucleo-32/Nucleo-64: USART2 - PA2/PA3
•
Nucleo-144: USART3 - PA9/PA10
•
Discovery: not standard. Refer to the board schematics
•
EVAL: not standard. Refer to the board schematics. Either the VCP or the RS232
connector can be used
In STM32CubeMX, for Nucleo board, the VCP USART pins (PA2/PA3) are reserved by
default, but required to be enabled by selecting “asynchronous” in USART mode selection
box as shown in
Figure 48. USART Pinout configuration with STM32CubeMX
Then, set the UART communication settings in
Configuration
->
USART2 Configuration
->
Parameter Settings
as shown in
.
Содержание STM32 Series
Страница 46: ...Connecting to the board AN4989 46 118 AN4989 Rev 3 Figure 30 Keil hotplug step2 ...
Страница 91: ...AN4989 Rev 3 91 118 AN4989 Debug through hardware exploration 117 Figure 69 STM32F4 F7 dual MCO capabilities ...
Страница 103: ...AN4989 Rev 3 103 118 AN4989 Managing DBGMCU registers 117 Figure 78 Generator Options debug MCU in STM32CubeIDE ...