Every once in a while, someone finds my blog by searching for how to determine the baud rate of the serial debug port. So I thought that I would look into how to answer that for them.
First, try 38400, 8 bit, no parity, 1 stop bit and no handshaking. This is a common setting for the serial debug port.
Second, read the documentation for your board if you bought it in a system from an OEM.
Last, look in the code. If you need to do this, then you must be the OEM and using a BSP from either Microsoft or a someplace else. I can’t tell you exactly which file to look in because each BSP is different. 
I can tell you to look for OEMDebugInit() and OEMInitDebugSerial().
·         OEMDebugInit() is called from BLCommon in the bootloader. BLCommon is a set of functions provided in common code to simplify development of bootloaders.
·         OEMInitDebugSerial() is called before OEMInit() in the kernel. 
OEMDebugInit() and OEMInitDebugSerial() may be in the BSP, Platform\Common or Public\Common\OAK\CSP depending on the version of Windows CE and the BSP.
OEMInitDebugSerial () is a required function, but OEMDebugInit() is only required if the bootloader uses BLCommon. They aren’t required to actually do anything. If they do something, they will initialize the UART for debug output and input.
Don’t expect that that these functions are necessarily easy to read, CEPC sets some hardcoded values in the registers.  It does have comments, which does assume that the code matches the comments. So be prepared to read the datasheet for the UART to understand what the registers do.
So with some digging in the code, it is possible to determine the baud rate.
Copyright © 2009 – Bruce Eitman
All Rights Reserved