From 2cf4e30b1116ecef0114639aa71e1d861ebc7b1f Mon Sep 17 00:00:00 2001 From: Antonio Lignan Date: Tue, 29 Jan 2013 12:23:23 +0100 Subject: [PATCH] Baudrate now is configured taking into account the MCU frequency, instead of using fixed values for 8MHz freq --- cpu/msp430/f2xxx/uart0.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/cpu/msp430/f2xxx/uart0.c b/cpu/msp430/f2xxx/uart0.c index 938fe9c4c..0a17636fb 100644 --- a/cpu/msp430/f2xxx/uart0.c +++ b/cpu/msp430/f2xxx/uart0.c @@ -114,7 +114,7 @@ uart0_init(unsigned long ubr) UCA0CTL1 |= UCSWRST; /* Hold peripheral in reset state */ UCA0CTL1 |= UCSSEL_2; /* CLK = SMCLK */ - UCA0BR0 = 0x45; /* 8MHz/115200 = 69 = 0x45 */ + UCA0BR0 = ubr; /* 8MHz/115200 = 69 = 0x45 */ UCA0BR1 = 0x00; UCA0MCTL = UCBRS_3; /* Modulation UCBRSx = 3 */