比如说,把开发板和pc连在一起,打开pc上的串口软件,再打开开发板上(wince5.0系统)的串口软件就会在pc上串口软件上收到一些信息,每当板子接收到数据时,pc上的串口软件就会收到类似 "+SL GETSTATUS xxxxxx" 这样的信息。
方法:
打开WINCE500/PLATFORM/smdk2440/KERNEL/HAL目录下的debug.c文件中有没有"#define NODEBUG 0"
如果有,就将其改为"#define NODEBUG 1"
如果没有就在OEMInitDebugSerial函数开头位置增加个“return”,参考下面的例子
void OEMInitDebugSerial(void)
{
volatile UART1reg *s2440UART1 = (UART1reg *)UART0_BASE;
volatile IOPreg *s2440IOP = (IOPreg *)IOP_BASE;
return;
// UART1 (TXD1 & RXD1) used for debug serial.
//
// Configure port H for UART.
//440IOP->rGPHCON &= ~((3 < < 8) ¦ (3 < < 10)); // Configure GPH2 and GHP3 for UART1 Tx and Rx, respectively.
s2440IOP->rGPHCON ¦= ((2 < < 8) ¦ (2 < < 10)); //
s2440IOP->rGPHUP ¦= (1 < < 4) ¦ (1 < < 5); // Disable pull-up on TXD1 and RXD1.
// Configure UART.
//
s2440UART1->rUFCON = 0x0; // Disable the FIFO (TODO: do we need to enable the FIFO?)
s2440UART1->rUMCON = 0x0; // Disable AFC.
s2440UART1->rULCON = 0x3; // Normal mode, N81.
s2440UART1->rUCON = 0x245; // Rx pulse interrupt, Tx level interrupt, Rx error status interrupt enabled.
s2440UART1->rUBRDIV = ( (int)(S2440PCLK/16.0/UART1BaudRate + 0.5) -1 ); // Set up baudrate (38400).
}