none
CE 5.0 no serial port. RRS feed

  • Question

  • CreateFile("COM1:"...) failed with error code 55 ERROR_DEV_NOT_EXIST.

    I exaimined the registry values, there's no serial port infomation in [HKLM/Drivers/Active] or [HKLM/Drivers/BuiltIn].

    I have "Serial Port Support" included in my OSDesign, that is SYSGEN_SERDEV variable.

    What should be the point?

    Thursday, May 16, 2013 9:15 AM

Answers

  • 1. If you have the BSP source you can check if the PDD driver for serial port is present and is getting compiled and NK image contains the driver dll.

    2. Check you reg file again for serial driver entry as

    HKEY_LOCAL_MACHINE\Drivers\BuiltIn\<UART>or <SERIAL> or similar name

    "Prefix"="COM" or similar 3 letter name as an eg SER
        "Dll"="uart.dll" or similar dll name
        "DeviceArrayIndex"=dword:1

    3. using VS open the nk.bin file (Files->Open-><browse nk.bin file> and enter to open) and see if the serial port driver is present in the nk.bin file and the HKLM/Driver/Builtin reg.

    SYSGEN_SERDEV will include the MDD support, you need to find the PDD driver is present or not and if present then what is the prefix. Accordingly you need to use the same prefix in the CreateFile and the index.

    --- Misbah


    Senior Design Engineer T.E.S Electroni Solutions (Bangalore-India) www.tes-dst.com email-misbah.khan@tes-dst.com


    Thursday, May 16, 2013 10:48 AM
  • The serial driver is BSP Specific.  In addition to adding OS specific support, makes sure your BSP does have the PDD driver.  The BSP might have conditionally disabled the driver from including in to the image. There should be some BSP_ variables in the platform batch file that you have to set. For example,

    set BSP_SERIAL=1 etc..

    Best Regards,

    Rakesh.


    Thursday, May 16, 2013 5:33 PM

All replies

  • 1. If you have the BSP source you can check if the PDD driver for serial port is present and is getting compiled and NK image contains the driver dll.

    2. Check you reg file again for serial driver entry as

    HKEY_LOCAL_MACHINE\Drivers\BuiltIn\<UART>or <SERIAL> or similar name

    "Prefix"="COM" or similar 3 letter name as an eg SER
        "Dll"="uart.dll" or similar dll name
        "DeviceArrayIndex"=dword:1

    3. using VS open the nk.bin file (Files->Open-><browse nk.bin file> and enter to open) and see if the serial port driver is present in the nk.bin file and the HKLM/Driver/Builtin reg.

    SYSGEN_SERDEV will include the MDD support, you need to find the PDD driver is present or not and if present then what is the prefix. Accordingly you need to use the same prefix in the CreateFile and the index.

    --- Misbah


    Senior Design Engineer T.E.S Electroni Solutions (Bangalore-India) www.tes-dst.com email-misbah.khan@tes-dst.com


    Thursday, May 16, 2013 10:48 AM
  • The serial driver is BSP Specific.  In addition to adding OS specific support, makes sure your BSP does have the PDD driver.  The BSP might have conditionally disabled the driver from including in to the image. There should be some BSP_ variables in the platform batch file that you have to set. For example,

    set BSP_SERIAL=1 etc..

    Best Regards,

    Rakesh.


    Thursday, May 16, 2013 5:33 PM
  • 1.I have no source of my BSP.

    2.I found the following content in my platform.reg:

    ; @CESYSGEN IF CE_MODULES_SERIAL
    IF BSP_NOSERIAL !
    
    ; COM1
    IF BSP_SERIAL1
    [HKEY_LOCAL_MACHINE\Drivers\BuiltIn\Serial1]
       "SysIntr"=dword:14
       "IoBase"=dword:03F8
       "IoLen"=dword:8
       "DeviceArrayIndex"=dword:0
       "Prefix"="COM"
       "IClass"="{CC5195AC-BA49-48a0-BE17-DF6D1B0173DD}"
       "Dll"="Com16550.Dll"
       "Order"=dword:0
       "Priority"=dword:0
    ; Turn on follows for Installable ISR (isr16550 supporting SOFTWARE FIFO)
    ;   "Irq"=dword:4
    ;   "IsrDll"="isr16550.dll"
    ;   "IsrHandler"="ISRHandler"
    
    [HKEY_LOCAL_MACHINE\Drivers\BuiltIn\Serial1\Unimodem]
       "Tsp"="Unimodem.dll"
       "DeviceType"=dword:0
       "FriendlyName"=LOC_FRIENDLYNAME_SERIAL1
       "DevConfig"=hex: 10,00, 00,00, 05,00,00,00, 10,01,00,00, 00,4B,00,00, 00,00, 08, 00, 00, 00,00,00,00
    ENDIF BSP_SERIAL1
    
    ; COM2
    IF BSP_SERIAL2
    [HKEY_LOCAL_MACHINE\Drivers\BuiltIn\Serial2]
       "SysIntr"=dword:13
       "IoBase"=dword:02F8
       "IoLen"=dword:8
       "DeviceArrayIndex"=dword:1
       "Prefix"="COM"
       "IClass"="{CC5195AC-BA49-48a0-BE17-DF6D1B0173DD}"
       "Dll"="Com16550.Dll"
       "Order"=dword:0
       "Priority"=dword:0
    ; Turn on follows for Installable ISR (isr16550 supporting SOFTWARE FIFO)
    ;   "Irq"=dword:3
    ;   "IsrDll"="isr16550.dll"
    ;   "IsrHandler"="ISRHandler"
    
    [HKEY_LOCAL_MACHINE\Drivers\BuiltIn\Serial2\Unimodem]
       "Tsp"="Unimodem.dll"
       "DeviceType"=dword:0
       "FriendlyName"=LOC_FRIENDLYNAME_SERIAL2
       "DevConfig"=hex: 10,00, 00,00, 05,00,00,00, 10,01,00,00, 00,4B,00,00, 00,00, 08, 00, 00, 00,00,00,00
    ENDIF BSP_SERIAL2
    
    ; COM3
    IF BSP_SERIAL3
    [HKEY_LOCAL_MACHINE\Drivers\BuiltIn\Serial3]
       "SysIntr"=dword:14
       "IoBase"=dword:03E8
       "IoLen"=dword:8
       "DeviceArrayIndex"=dword:2
       "Prefix"="COM"
       "IClass"="{CC5195AC-BA49-48a0-BE17-DF6D1B0173DD}"
       "Dll"="Com16550.Dll"
       "Order"=dword:0
    ; Turn on follows for Installable ISR (isr16550 supporting SOFTWARE FIFO)
    ;   "Irq"=dword:4
    ;   "IsrDll"="isr16550.dll"
    ;   "IsrHandler"="ISRHandler"
    
    [HKEY_LOCAL_MACHINE\Drivers\BuiltIn\Serial3\Unimodem]
       "Tsp"="Unimodem.dll"
       "DeviceType"=dword:0
       "FriendlyName"=LOC_FRIENDLYNAME_SERIAL3
       "DevConfig"=hex: 10,00, 00,00, 05,00,00,00, 10,01,00,00, 00,4B,00,00, 00,00, 08, 00, 00, 00,00,00,00
    ENDIF BSP_SERIAL3
    
    ; COM4
    IF BSP_SERIAL4
    [HKEY_LOCAL_MACHINE\Drivers\BuiltIn\Serial4]
       "SysIntr"=dword:13
       "IoBase"=dword:02E8
       "IoLen"=dword:8
       "DeviceArrayIndex"=dword:3
       "Prefix"="COM"
       "IClass"="{CC5195AC-BA49-48a0-BE17-DF6D1B0173DD}"
       "Dll"="Com16550.Dll"
       "Order"=dword:0
    ; Turn on follows for Installable ISR (isr16550 supporting SOFTWARE FIFO)
    ;   "Irq"=dword:3
    ;   "IsrDll"="isr16550.dll"
    ;   "IsrHandler"="ISRHandler"
    
    [HKEY_LOCAL_MACHINE\Drivers\BuiltIn\Serial4\Unimodem]
       "Tsp"="Unimodem.dll"
       "DeviceType"=dword:0
       "FriendlyName"=LOC_FRIENDLYNAME_SERIAL4
       "DevConfig"=hex: 10,00, 00,00, 05,00,00,00, 10,01,00,00, 00,4B,00,00, 00,00, 08, 00, 00, 00,00,00,00
    ENDIF BSP_SERIAL4
    ENDIF BSP_NOSERIAL !

    3.I can open my nk.bin from vs 2012 in binary mode, and I searched HKLM/Driver/Builtin for no result. What to search for serial driver?

    Saturday, May 18, 2013 3:46 AM
  • I think the variable may be

    BSP_SERIAL1

    and

    BSP_NOSERIAL

    Witch file is the "platform batch file" and where should I set these variables?

    Saturday, May 18, 2013 3:48 AM
  • There are various ways to set the variable:

    1. Open build window and set the variable there.

    2. You can set the BSP variable in your BSP's platform.bat file, which is generally present under the BSP directory.


    -Pranjal

    Saturday, May 18, 2013 9:29 AM
  • I have changed the file:

    C:\WINCE500\PLATFORM\Geodelx\GeodeLX.bat

    part of the file content:

    @REM Serial Ports
    @REM
    @REM Make sure NOSERIAL is clear to enable serial ports.
    @REM Do not select ports 1 and 3, or ports 2 and 4 at the
    @REM same time as they share interrupts and the driver does
    @REM not support multiple ports sharing a single interrupt.
    
    set BSP_NOSERIAL=
    set BSP_SERIAL1=1
    set BSP_SERIAL2=1
    set BSP_SERIAL3=
    set BSP_SERIAL4=
    
    set BSP_NOUSBSER=1

    I also set my osdesign settings and add the following variables

    BSP_NOSERIAL=0
    BSP_SERIAL1=1
    BSP_SERIAL2=1
    IMGRAM512=1

    But the same. There's no serial port.

    Monday, May 20, 2013 4:05 AM
  • The message from all previous posters is: THIS IS A BSP ISSUE! You must contact the BSP vendor or read the BSP documentation, etc. to figure out what you must do to enable your serial port(s). We can tell you how it works for some BSPs but we can't make general statements about your BSP, especially since you haven't defined where you got it.

    If you want a guess, I'd bet that the RETAIL BSP normally provides a single serial port but, when you build a DEBUG image, it takes that port for debug serial output eliminating application port access (no driver in the registry, no device available to applications).

    Paul T.

    Monday, May 20, 2013 3:29 PM
  • I got the BSP from a friend. It is GeodeLX.

    I've made a Release build. But there's no serial port either.

    Thanks for the reply all the same.

    Tuesday, May 21, 2013 4:19 AM
  • @ Percy

    Your problem is caused by IRQ settings for the serial ports.

    According to the registry entries you posted, the OS image is built with the following IRQ and I/O settings for the serial ports:

    COM1    -    IRQ-4    3F8

    COM2    -    IRQ-3    2F8

    COM3    -    IRQ-4    3E8

    COM4    -    IRQ-3    2E8

    COM1 and COM3 are both sharing IRQ-4

    COM2 and COM4 are both sharing IRQ-3

    Yet, the "isr16550.dll" is excluded, which is needed to support IRQ sharing, assuming the BSP you are using is configured to support IRQ sharing, which I suspect it does not.

    You need to check the system BIOS to make sure the IRQ and I/O settings for each serial port match the registry entries.  In addition, to resolve the IRQ sharing issue, you need to configure each Serial port to use a separate IRQ.  Otherwise, you need to enable IRQ sharing.

     


    Samuel Phung [eMVP] Blog: http://www.embedded101.com/samuelp101/ Twitter: @Samuelp101

    Thursday, May 30, 2013 12:07 AM