Configuration of interrupts

  • Hi


    I'm trying to use the interrupt feature of the device but I don't appear to be able to initialise the interface using the code below
    I get an error 87 from the call to DeviceIoControl. Could you please tell me where I'm going wrong Thanks


  • Hello,


    - can you tell me how the registry is configured?
    - what happens if you ignore this error?

    F&S Elektronik Systeme GmbH
    As this is an international forum, please try to post in English.
    Da dies ein internationales Forum ist, bitten wir darum, Beiträge möglichst in Englisch zu verfassen.

  • I haven't attampted to continue to configure the IRQ due to the error being reported. Do you believe the error is incorrect and could be ignored?


    The registry settings are


    [HKEY_LOCAL_MACHINE\Drivers\BuiltIn\DIGITALIO]
    "FriendlyName"="Digital I/O driver for NetDCU"
    "Port"=dword:00000001
    "Ioctl"=dword:00000004
    "Index"=dword:00000001
    "Order"=dword:00000097
    "Dll"="DIGIO.dll"
    "Prefix"="DIO"
    "UseAsIo"=dword:0000ffff
    "DataDir"=dword:00000015

  • Hello,


    -for use IO Bit 7 as IRQ you should configure registry a following:

    Code
    1. reg open \Drivers\BuiltIn\DigitalIO
    2. reg set value UseAsIO DWORD 0x00000080
    3. reg set value DataDir DWORD 0x00000000
    4. reg set value DataInit DWORD 0x00000000
    5. reg set value IRQCfg0 DWORD 0x00000000
    6. reg set value IRQCfg1 DWORD 0x00000080
    7. reg set value IRQCfg2 DWORD 0x00000000
    8. reg save


    Quote

    Do you believe the error is incorrect and could be ignored?


    Yes, maybe it comes from an other module. Did you call SetLastError() before?


    Here you will find a sample: http://www.forum.fs-net.de/viewtopic.php?f=4&t=631.

    F&S Elektronik Systeme GmbH
    As this is an international forum, please try to post in English.
    Da dies ein internationales Forum ist, bitten wir darum, Beiträge möglichst in Englisch zu verfassen.

  • Quote from "fs-support_ZU"


    -for use IO Bit 7 as IRQ you should configure registry a following:

    Code
    1. reg open \Drivers\BuiltIn\DigitalIO
    2. reg set value UseAsIO DWORD 0x00000080
    3. reg set value DataDir DWORD 0x00000000
    4. reg set value DataInit DWORD 0x00000000
    5. reg set value IRQCfg0 DWORD 0x00000000
    6. reg set value IRQCfg1 DWORD 0x00000080
    7. reg set value IRQCfg2 DWORD 0x00000000
    8. reg save


    Looking at the documentation it indicates that the IRQCfg settings are for the NetDCU6 I'm using a 5.2 Module it this correct for a 5.2?


    Quote


    Did you call SetLastError() before?


    No I haven't tried resetting the error state I will give this a go

  • Hello

    Quote

    Looking at the documentation it indicates that the IRQCfg settings are for the NetDCU6 I'm using a 5.2 Module it this correct for a 5.2?

    Ok, that is right IRQ feature is not implementet in the 5.2 driver right now. You may use externel IRQ (J5.1) for your purpose (see code below). Else - do you need the IRQ feature for a new design? Is it possible to switch to NetDCU9? NetDCU9 offers in general more modern features as 5.2!


    F&S Elektronik Systeme GmbH
    As this is an international forum, please try to post in English.
    Da dies ein internationales Forum ist, bitten wir darum, Beiträge möglichst in Englisch zu verfassen.

  • Quote


    Ok, that is right IRQ feature is not implementet in the 5.2 driver right now. You may use externel IRQ (J5.1) for your purpose (see code below). Else - do you need the IRQ feature for a new design? Is it possible to switch to NetDCU9? NetDCU9 offers in general more modern features as 5.2!


    That would explain the error then.
    Unfortunately I can't change hardware as I'm working with preinstalled hardware I will have to give the external IRQ a go.


    Thanks for your help.