Echo test is working.
authortravisutk <travisutk@12e2690d-a6be-4b82-a7b7-67c4a43b65c8>
Tue, 2 Jun 2009 16:42:44 +0000 (16:42 +0000)
committertravisutk <travisutk@12e2690d-a6be-4b82-a7b7-67c4a43b65c8>
Tue, 2 Jun 2009 16:42:44 +0000 (16:42 +0000)
git-svn-id: https://svn.code.sf.net/p/goodfet/code/trunk@20 12e2690d-a6be-4b82-a7b7-67c4a43b65c8

firmware/lib/msp430f1612.c
firmware/tests/echo/Makefile
firmware/tests/echo/echo.c

index c003213..08e3dd8 100644 (file)
@@ -16,8 +16,6 @@ unsigned char serial_rx(){
   IFG1&=~URXIFG0;
   U0TCTL &= ~URXSE;
   
   IFG1&=~URXIFG0;
   U0TCTL &= ~URXSE;
   
-  PLEDOUT^=PLEDPIN;
-  
   return c;
 }
 //! Transmit a byte.
   return c;
 }
 //! Transmit a byte.
@@ -41,6 +39,7 @@ void msp430_init_uart(){
   UTCTL0 = SSEL1;                       /* UCLK = MCLK */
 
   //http://mspgcc.sourceforge.net/baudrate.html
   UTCTL0 = SSEL1;                       /* UCLK = MCLK */
 
   //http://mspgcc.sourceforge.net/baudrate.html
+  //9600 baud
   UBR00=0x00; UBR10=0x01; UMCTL0=0x00;
   
   ME1 &= ~USPIE0;                      /* USART1 SPI module disable */
   UBR00=0x00; UBR10=0x01; UMCTL0=0x00;
   
   ME1 &= ~USPIE0;                      /* USART1 SPI module disable */
index e8efa32..1e5bbe8 100644 (file)
@@ -15,7 +15,6 @@ app=echo
 
 install: $(app)
        $(BSL) -e -p $(app) 
 
 install: $(app)
        $(BSL) -e -p $(app) 
-       #$(BSL) -P $(app) -g 0x2500
        $(BSL) -P $(app) -r
 $(app): $(app).c $(libs)
 erase:
        $(BSL) -P $(app) -r
 $(app): $(app).c $(libs)
 erase:
index 1f55288..57fd760 100644 (file)
@@ -20,17 +20,8 @@ void init(){
   PLEDDIR |= PLEDPIN;\r
   \r
   msp430_init_dco();\r
   PLEDDIR |= PLEDPIN;\r
   \r
   msp430_init_dco();\r
-  \r
   msp430_init_uart();\r
   \r
   msp430_init_uart();\r
   \r
-  while(1){\r
-    i = 10000;\r
-    while(i--);\r
-    \r
-    serial_tx(0x80);\r
-    PLEDOUT^=PLEDPIN;  // Blink\r
-  }\r
-  \r
   //Enable Interrupts.\r
   //eint();\r
 }\r
   //Enable Interrupts.\r
   //eint();\r
 }\r
@@ -45,7 +36,7 @@ int main(void)
   PLEDOUT^=PLEDPIN;  // Blink\r
   \r
   //while(1) serial_tx(serial_rx());\r
   PLEDOUT^=PLEDPIN;  // Blink\r
   \r
   //while(1) serial_tx(serial_rx());\r
-  while(1) serial_tx(0x80);\r
+  while(1) serial_tx(serial_rx());\r
   \r
   while(1){\r
     i = 10000;\r
   \r
   while(1){\r
     i = 10000;\r