From 557c8df140db5df5873520c05a1415ebf7202a37 Mon Sep 17 00:00:00 2001 From: travisutk Date: Tue, 2 Jun 2009 16:42:44 +0000 Subject: [PATCH] Echo test is working. git-svn-id: https://svn.code.sf.net/p/goodfet/code/trunk@20 12e2690d-a6be-4b82-a7b7-67c4a43b65c8 --- firmware/lib/msp430f1612.c | 3 +-- firmware/tests/echo/Makefile | 1 - firmware/tests/echo/echo.c | 11 +---------- 3 files changed, 2 insertions(+), 13 deletions(-) diff --git a/firmware/lib/msp430f1612.c b/firmware/lib/msp430f1612.c index c003213..08e3dd8 100644 --- a/firmware/lib/msp430f1612.c +++ b/firmware/lib/msp430f1612.c @@ -16,8 +16,6 @@ unsigned char serial_rx(){ IFG1&=~URXIFG0; U0TCTL &= ~URXSE; - PLEDOUT^=PLEDPIN; - return c; } //! Transmit a byte. @@ -41,6 +39,7 @@ void msp430_init_uart(){ UTCTL0 = SSEL1; /* UCLK = MCLK */ //http://mspgcc.sourceforge.net/baudrate.html + //9600 baud UBR00=0x00; UBR10=0x01; UMCTL0=0x00; ME1 &= ~USPIE0; /* USART1 SPI module disable */ diff --git a/firmware/tests/echo/Makefile b/firmware/tests/echo/Makefile index e8efa32..1e5bbe8 100644 --- a/firmware/tests/echo/Makefile +++ b/firmware/tests/echo/Makefile @@ -15,7 +15,6 @@ app=echo install: $(app) $(BSL) -e -p $(app) - #$(BSL) -P $(app) -g 0x2500 $(BSL) -P $(app) -r $(app): $(app).c $(libs) erase: diff --git a/firmware/tests/echo/echo.c b/firmware/tests/echo/echo.c index 1f55288..57fd760 100644 --- a/firmware/tests/echo/echo.c +++ b/firmware/tests/echo/echo.c @@ -20,17 +20,8 @@ void init(){ PLEDDIR |= PLEDPIN; msp430_init_dco(); - msp430_init_uart(); - while(1){ - i = 10000; - while(i--); - - serial_tx(0x80); - PLEDOUT^=PLEDPIN; // Blink - } - //Enable Interrupts. //eint(); } @@ -45,7 +36,7 @@ int main(void) PLEDOUT^=PLEDPIN; // Blink //while(1) serial_tx(serial_rx()); - while(1) serial_tx(0x80); + while(1) serial_tx(serial_rx()); while(1){ i = 10000; -- 2.20.1