Skip to main content
Visitor II
June 4, 2012
Question

STM8S UART Speed

  • June 4, 2012
  • 1 reply
  • 903 views
Posted on June 04, 2012 at 10:52

I am using the UART1_Printf example from the STM8S Standard Peripheral Library version 2.1 and I am having problems with the speed of the UART.  I am expecting to see 115200 baud but according to my logica analyser I am in fact seeing  53 baud (approx).

To double check the LA value I have fed the output from an independent system running .NETMF and asked it to produce a similar signal.  The LA reports the right baud rate give or take a small deviation (i.e. 9615 baud).

Is anyone else seeing similar problems or have a solution?

Regards,

Mark

#uart-baud-rate
    This topic has been closed for replies.

    1 reply

    NevynAuthor
    Visitor II
    June 5, 2012
    Posted on June 05, 2012 at 23:41

    I think I have found the problem, the BRR1 and BRR2 registers we not being set correctly.  I hacked the stm8s_uart1.c library file and set the register values and it works.

    regards,

    Mark