Skip to main content
djackson
Associate II
March 14, 2014
Question

STM32 Discovery board and fractional baud rate

  • March 14, 2014
  • 4 replies
  • 845 views
Posted on March 14, 2014 at 17:11

I have the STM32F4 Discovery board (STM32F407 MCU) and was wondering if it is possible to enable fractional baud rates on this board.  I'd like to get a UART input rate of 100000 baud.

    This topic has been closed for replies.

    4 replies

    waclawek.jan
    Super User
    March 14, 2014
    Posted on March 14, 2014 at 17:30

    Why would that depend on the *board* rather than on the *chip*?

    The answer is yes, but whether your particular baudrate is achievable and practical (i.e. error small enough) depends on the respective APB clock.

    Review RM0090 chapter 30.3.4.

    JW
    Tesla DeLorean
    Guru
    March 14, 2014
    Posted on March 14, 2014 at 17:47

    It uses the fractional mode all the time, basically you divide the APB clock by (baud * 16) and by happenstance you both need a x16 clock, and there are 4-bits for the fractional setting.

    So with a 42 MHz APB, write 420 in the BRR for 100000 baud
    Tips, Buy me a coffee, or three.. PayPal VenmoUp vote any posts that you find helpful, it shows what's working..
    djackson
    djacksonAuthor
    Associate II
    March 14, 2014
    Posted on March 14, 2014 at 17:55

    Good point on the chip vs the board. I wasn't sure what rates the APB clock could do.  I'll keep pulling documents and checking.

    djackson
    djacksonAuthor
    Associate II
    March 14, 2014
    Posted on March 14, 2014 at 17:56

    Perfect!  This should get me up and running right away.  Thank you.