CreateFile with SPI fails

  • Hello


    I'm using PicoMod4 and VS2008 Pro. If I start the SPIandI2C example, CreateFile:

    Code
    1. m_hFile = CreateFile(_T("SPI1:"), GENERIC_READ | GENERIC_WRITE, FILE_SHARE_READ, NULL, OPEN_EXISTING, FILE_FLAG_WRITE_THROUGH, 0);


    returns with

    Code
    1. m_hFile 0xffffffff {void*} void*


    I have added this to the reg:


    How to solve this problem?

  • Hello,
    please note: SPI and I2C are not available on all our boards by default! In general these drivers are optional. Contact <!-- e --><a href="mailto:sales@fs-net.de">sales@fs-net.de</a><!-- e --> for details.
    Note also the sample "SPIandI2C" refers SW I2C and SW SPI.

    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.

  • Hello,
    if customer order optional drivers we do not install them (in general). You will get CD with driver, install instructions and documentation.
    If driver is already installed you will find DLL under \ffsdisk and register settings under HKLM\Drivers\BuildIn.

    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.

  • Hello,


    i've the same problem.


    hDevice = CreateFile(TEXT("SPI1:"),
    GENERIC_READ | GENERIC_WRITE,
    0, NULL, OPEN_EXISTING,
    FILE_FLAG_WRITE_THROUGH , 0);


    returns with:
    hDevice 0xffffffff {void*} void*


    the program starts without errors but i've no signals on the io's ( should i have a clk signal?)


    NSPI-PicoCOM2_V1-3.cab‎ is installed


    the registry settings may be correct.