Author |
Topic |
|
vboccanfuso
30 Posts |
Posted - 05 Sep 2008 : 12:58:01
|
Hi,
I'm using code from your COMTerm example (http://support.eurotech-inc.com/forums/topic.asp?TOPIC_ID=256&SearchTerms=comterm) to develop serial drivers for my application. When I use your CheckPorts() function below and call CreateFile(), the only port that returns a valid handle is COM2. For COM1 & COM3, CreateFile() returns 0xffffffff and GetLastError() returns 55 (ERROR_DEV_NOT_EXIST). How do I get COM1 and COM3 to work? I know COM1 is used by the bootloader on power-up. Could it not be closing the port when its done? I have no idea what if anything is using COM3. Thanks for any help you can provide on this.
Here is my version information: Sphere Bootloader Version 1.11 (Built Nov 6 2007, 16:35:22) Sphere Windows CE Ver. 5.00.19 Sphere_Core
My hardware is a SphereII Dev kit
// From EuroTech main.cpp (COMTerm example app.) int SerialPort::CheckPorts() { // check all available COM ports, return the lowest available BOOL bFound = FALSE; int lowport = 0; HANDLE hPort = NULL;
#define dim(x) (sizeof(x) / sizeof(x[0]))
for(int i = 0 ; i < dim(ports) ; i++) { hPort = CreateFile (ports[i], GENERIC_READ | GENERIC_WRITE, 0, NULL, OPEN_EXISTING, 0,NULL);
|
Edited by - vboccanfuso on 05 Sep 2008 14:41:53 |
|
vboccanfuso
30 Posts |
Posted - 09 Sep 2008 : 17:41:46
|
EuroTech Response (via email): Sphere 5.00.23 Core build has just been posted. It should fix the COM3 problem. Give it a try and let us know your results. COM1 is your debug port. It continues to be used for debug output the whole time the board is booted.
|
|
|
|
Topic |
|
|
|