cancel
Showing results for 
Search instead for 
Did you mean: 

USART2 communication stm32f407 discovery

MKarp.1
Associate II

I've recently started studying stm32f4 discovery and I'm trying to enable USART2 communication through virtual com port. I've tried to use the code from the book called "stm32 Arm programming for embedded systems" (I've changed value of BRR register, which was originally 0x0683 because the author was using stm32f446re nucleo) . Unfortunately, it doesn't work and I don't know, why.

3 REPLIES 3
MKarp.1
Associate II

P.S. in stm32f4xx.h I've set HSE_VALUE to 8000000 and in system_stm32f4xx.c-PLL_Q to 8

KnarfB
Principal III

The stm32f4discovery board does not connect the USART2 pins to the debug chip.

"stm32f4discovery User Manual.pdf" Figure 6. "ST-LINK VCP connection to USART2" shows how to add that connection.

Vivek yadav1
Associate III

Hi MKarp,

I Don't know about this book ? So can't say anything.

Do you have any experience with CubeMX IDE ?

please generate code and then see the settings of USART registers.

If you are very new to bare metal programming then TOP to BOTTOM approach is good for learning.