From: travisutk Date: Mon, 7 May 2012 22:46:37 +0000 (+0000) Subject: Forgot to explicitly init silent=0. X-Git-Url: http://git.rot13.org/?p=goodfet;a=commitdiff_plain;h=a25b880a237c5c2ee3a2639a27e558edac80f2d6 Forgot to explicitly init silent=0. git-svn-id: https://svn.code.sf.net/p/goodfet/code/trunk@1168 12e2690d-a6be-4b82-a7b7-67c4a43b65c8 --- diff --git a/firmware/apps/monitor/monitor.c b/firmware/apps/monitor/monitor.c index 039cf6e..4f36833 100644 --- a/firmware/apps/monitor/monitor.c +++ b/firmware/apps/monitor/monitor.c @@ -51,8 +51,8 @@ app_t const monitor_app = { //! Handles a monitor command. void monitor_handle_fn(uint8_t const app, - uint8_t const verb, - uint32_t const len) + uint8_t const verb, + uint32_t const len) { int i; @@ -63,9 +63,10 @@ void monitor_handle_fn(uint8_t const app, break; case MONITOR_ECHO: - //Echo back the same buffer. - txdata(app,verb,len); - break; + //Echo back the same buffer. + debugstr("About to monitor echo."); + txdata(app,verb,len); + break; case MONITOR_LIST_APPS: // transmit firmware build date @@ -87,6 +88,8 @@ void monitor_handle_fn(uint8_t const app, cmddata[0]=memorybyte[cmddataword[0]]; #else debugstr("Monitor peeks are unsupported on this platform."); + debughex(cmddataword[0]); + cmddata[0]=0x00; #endif txdata(app,verb,1); break; @@ -98,6 +101,8 @@ void monitor_handle_fn(uint8_t const app, cmddata[0] = memorybyte[cmddataword[0]]; #else debugstr("Monitor pokes are unsupported on this platform."); + debughex(cmddataword[0]); + cmddata[0]=0x00; #endif txdata(app,verb,1); break; diff --git a/firmware/goodfet.c b/firmware/goodfet.c index 90e4d0f..939c52c 100644 --- a/firmware/goodfet.c +++ b/firmware/goodfet.c @@ -84,6 +84,9 @@ int main(void){ unsigned long len; // MSP reboot count for reset input & reboot function located at 0xFFFE volatile unsigned int reset_count = 0; + + silent=0; //Don't trust globals. + #if (platform == tilaunchpad) int ret=0; diff --git a/firmware/lib/command.c b/firmware/lib/command.c index 7c57798..6388c64 100644 --- a/firmware/lib/command.c +++ b/firmware/lib/command.c @@ -66,7 +66,7 @@ void txhead(unsigned char app, void txdata(unsigned char app, unsigned char verb, unsigned long len){ - unsigned int i=0; + unsigned long i=0; if(silent) return; txhead(app,verb,len); @@ -148,7 +148,7 @@ void prep_timer() TBCTL = 0x0204; /* Driven by SMCLK; disable Timer B interrupts; reset timer in case it was previously in use */ #else - #warning "Function unimplemented for this platform." + #warning "prep_timer() unimplemented for this platform." #endif } #if (platform != tilaunchpad) diff --git a/firmware/lib/stm32f407.c b/firmware/lib/stm32f407.c index fd06abc..577fec0 100644 --- a/firmware/lib/stm32f407.c +++ b/firmware/lib/stm32f407.c @@ -140,7 +140,9 @@ void USART1_Configuration(void) //USART_InitStructure.USART_BaudRate = 115200; //USART_InitStructure.USART_BaudRate = 125200; //Close enough to 115200 - USART_InitStructure.USART_BaudRate = 130000; //Close enough to 115200 + //135000 is too high + //115200 is too low + USART_InitStructure.USART_BaudRate = 125000; //Close enough to 115200 USART_InitStructure.USART_WordLength = USART_WordLength_8b; USART_InitStructure.USART_StopBits = USART_StopBits_1;