cancel
Showing results for 
Search instead for 
Did you mean: 

STM32F407G-DISC1 does not support virtual com, I cannot send data to PC via UART through virtual com

demir
Senior II

Hi All,

I can not send data from the board to the PC via UART. I can see that USART2 can be used as virtual com. But, when send data from board to the PC, I can not see anything on serial port, I use TeraTerm, Putty, Hercules. I thought the new version of STM32F407G-DISC1 board has this feature built in, but apparently it does not.

Can anyone help me with this please ?

13 REPLIES 13

Thats right, you need the serial to usb converter.

>>Doesn't that make it useless..

Wouldn't be my choice, for sure

The original board had a smaller, less capable, STM32F103 implementing the "ST-LINK/V2" functionality, which wasn't capable of the MSC / CDC function. The later board was fitted with the ST-LINK/V2-1 capable device to accommodate mbed support that came along when the NUCLEO's launched.

All the subsequent DISCO's support mbed, and the VCP

SWV (Serial Wire Viewer) via SWO/PB3/TDO pin is possible on this board, and is what I used in Keil a decade or more ago.

The ST-LINK Utilities facilitated this as a console, the newer STM32 Cube Programmer can also give you a SWV console, ditto IAR and KEIL

Pipe STDIO to ITM_SendChar()

Pick a NUCLEO-144 with a wealth of UARTs, and an Arduino Shield compatible socket.

There was a STM32F4DIS-EXT breakout board from a partnership with EmBest, this added an RS232, Micro SD, Ethernet, and options for Camera and LCD, although I'd imagine these would be harder to source in 2024

https://www.st.com/en/evaluation-tools/stm32f4dis-ext.html

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

>> I want to make sure I choose the right one

Ok, but what are the bounding parameters to this "choice" ?

All of the NUCLEO-144 series have multiple UART, support VCP, and aren't conflicted with respect to D0/D1 on the Arduino rail compatible shield socket.

I'd avoid the NUCLEO-64 due to the constrained pin count and conflicts on D0/D1

The DISCO's can bring screens, SDRAM, SDCard / eMMC, QUADSPI NOR Flash, etc

Check list the things and the budget you are working with. The NUCLEO-144 are typically in the $20-30 USD range, the DISCO's tend to be significantly more due to the LCDs and additional components.

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

Thank you @demir and @Tesla DeLorean!

I've been thinking there has to be a bug in my code, that 

HAL_UART_Transmit(&huart2, (uint8_t *)message, strlen(message), 100);

isn't the right way to print serial output. I've spent a few hours on this issue, and thanks to you I won't waste many more.

Why does the function HAL_UART_Transmit even exist for the STM32F407G-DISC1?
If it does work, it shouldn't exist, or perhaps the editor (I use VSCode) should at least display a warning.

Joachim Spange
Head in the embedded