Skip to main content
sgomes
Associate II
March 19, 2010
Question

USART in sycnchronous mode - uart in general problem possibly

  • March 19, 2010
  • 3 replies
  • 765 views
Posted on March 19, 2010 at 21:11

USART in sycnchronous mode - uart in general problem possibly

    This topic has been closed for replies.

    3 replies

    Tesla DeLorean
    Guru
    May 17, 2011
    Posted on May 17, 2011 at 13:44

    Try a lower speed, UART1 is rated for 4.5Mbaud, UART2/3 are rated for 2.25Mbaud, based on 72/36 MHz clocks on the peripheral buses respectively.

    Try enabling both sides of the UART

      USART_InitStructure.USART_Mode = USART_Mode_Rx | USART_Mode_Tx;

    -Clive
    Tips, Buy me a coffee, or three.. PayPal Venmo (See Profile) Up vote any posts that you find helpful, it shows what's working..
    sgomes
    sgomesAuthor
    Associate II
    May 17, 2011
    Posted on May 17, 2011 at 13:44

    You know how right after you click on 'send' you realize your mistake?  Is it just me?  You are right Clive.  Right after I posted my question I had a suspicion.  Yep.  lowering the baud rate fixes the issue.  I'm a little bummed that such a fast processor has such a limited speed but I'll just have to deal with it.

    Even though I solved it myself I'll still give you the point for posting first.  ;)

    Tomas DRESLER
    Associate II
    May 17, 2011
    Posted on May 17, 2011 at 13:44

    Easy :) Not only you.

    Btw. USART uses 16x oversampling of incoming data (and samples 7th, 8th and 9th sample to get the noise flag), that's why it must divide the PCLK2 clock by 16 first.