Skip to main content
MKarp.1
Associate II
March 18, 2020
Question

USART2 communication stm32f407 discovery

  • March 18, 2020
  • 3 replies
  • 1223 views

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.

    This topic has been closed for replies.

    3 replies

    MKarp.1
    MKarp.1Author
    Associate II
    March 18, 2020

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

    KnarfB
    Super User
    March 18, 2020

    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
    March 19, 2020

    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.