cancel
Showing results for 
Search instead for 
Did you mean: 

STM8S UART Speed

Nevyn
Associate II
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
1 REPLY 1
Nevyn
Associate II
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