summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGuillaume Knispel <gknispel@avencall.com>2012-08-23 18:44:14 +0200
committerGuillaume Knispel <gknispel@avencall.com>2012-08-23 18:44:14 +0200
commita9b31a06ac94b79c2ca4b9763d93acb31fa929a4 (patch)
treee9d221b4ce48523eeb0062d313a8f1ea36e81107
parentc14e25b58d8694f0c55a5b2a7a25ca5919fcb273 (diff)
select UART function on corresponding pins
-rw-r--r--main.c9
1 files changed, 7 insertions, 2 deletions
diff --git a/main.c b/main.c
index e34279d..cb8b797 100644
--- a/main.c
+++ b/main.c
@@ -74,8 +74,8 @@ volatile u8 bVCC3 = true;
// For UCOS16 = 1
-// BRCLK Baud Rate UCBRx UCBRSx UCBRFx Tx Error Rx Error
-// 12,000,000 115200 6 0 8 -1.8 0 -2.2 0.4
+// BRCLK Baud Rate UCBRx UCBRSx UCBRFx Tx Error Rx Error
+// 12,000,000 115200 6 0 8 -1.8 0 -2.2 0.4
static void SerialInit(void)
{
UCA0CTL1_bit.UCSWRST = 1;
@@ -87,6 +87,11 @@ static void SerialInit(void)
UCA0MCTL = 0x81; // UCOS16 = 1; UCBRSx = 0; UCBRFx = 8;
UCA0STAT = 0;
+ // Configure port for UART access
+ // Pin 25 as UCA0TXD
+ // Pin 26 as UCA0RXD
+ P3SEL |= 0x60;
+
UCA0CTL1_bit.UCSWRST = 0;
}