SPI Test Application RRS feed

  • Question

  • I need to test my SPI driver through Test APP,

    can any one explain the steps to test SPI interface driver testing

    through Test Application.



    Wednesday, October 6, 2010 6:53 AM

All replies

  • Hi,

    it is very difficult to answer your question given the little information you have provided.

    What hardware platform are you running on?

    Which CE version are you targeting?

    Did you write the driver or is it part of a 3rd party BSP?

    Most drivers use the stream driver interface which means that they can be accessed using the standard file i/o functions like CreateFile, ReadFile, WriteFile and DeviceIoControl.

    For more information on the stream driver interface refer to

    When writing a driver I usually create a console test application as subproject in my OSDesign to test the driver during the development phase.

    To test a driver I find it helpful to enable KITL even on a RELEASE image and have the driver loaded through RELFSD from _FLATRELEASEDIR, rather than integrating it into the image. I use ActivateDeviceEx and DeactivateDevice to load/unload the driver. This allows me to make changes to the driver whithout having to transfer the image after each change.

    For testing SPI communication you might want to consider using a hardware SPI logger to verify the correct configuration of your SPI hardware.


    HTH Bjoern



    Wednesday, October 6, 2010 8:07 AM
  • Hi,

    Thanks for response,

    We are using TI OMAPL138 HW, 3rd Party BSP & Windows Embedded CE 6.0  OS running in our HW.

    we are trying to load all drivers into target board & customizing all Microsoft provided Device Drivers

    into our HW platform.

    As mentioned above,

      "For testing SPI communication you might want to consider using a hardware SPI logger to verify the correct configuration of your SPI hardware."

    can please explain how to verify SPI HW is working or not?

    or how to verify HW SPI logger to verify the correct configuration of my SPI HW.?

    thanks in Advance.



    Wednesday, October 6, 2010 10:24 AM
  • Hi,

    in our setup we have a DSP connected through SPI to our CE CPU board.

    The hardware logger helped in finding the correct SPI mode (0 to 3), i.e. Clock polarity and Phase relationship, Chip select polarity and Bit Order the DSP is using to push out data. The logger also proved very helpfull in confirming that sent and received data are consistent.



    Wednesday, October 6, 2010 10:49 AM
  • Bjoern:

    Are you talking about an external SPI analyser that the OP would need to purchase?  Sounds like it, but I don't think that is clear.

    Sabari, are you asking how to write a driver to use your driver?  If so, it will be difficult for us to tell you how your driver works and how an application should use your driver.

    Bruce Eitman (eMVP)
    Senior Engineer
    Bruce.Eitman AT Eurotech DOT com
    My BLOG

    Eurotech Inc.
    Wednesday, October 6, 2010 12:33 PM
  • Hi,

    sorry if my post wasn't clear enough.

    Yes I was talking about an external SPI analyser.


    Wednesday, October 6, 2010 1:33 PM
  • HI Bruce,


    Thanks for your reply. SPI we  completed. 

    I have another doubt,


    in Application point of view,

    we created one application for Windows Embedded CE 6.0 device,

    I need to test Application (.exe) from my Windows Embedded CE6.0 device,

    please confirm the "Hopper Test tool" will work or not?

    (Kindly note :  we need to test only GUI (stress testing))









    Thursday, October 21, 2010 7:43 AM
  • An alternative to the SPI Analyzer would be to use a scope and check the polarity and signalling manually.  I've never used a SPI Analyzer but I would assume that manually checking (via scope) the signals is probably more time consuming.  You should also be able to use a Logic Analyzer if you have one present.

    In terms of testing the Driver, we generally write software that interfaces with the driver and plays with and stresses all of the drivers features (make sure everything works, failures work etc.)

    Past that you need to see if you have any devices connected to the SPI driver, if so you can write another test application to test and stress those devices over the SPI bus.

    No one can really tell you exactly what to do past that, we don't know what your driver interface is, if there are any libraries available for it etc...  SPI is also not a standard driver interface in Windows CE, so how it is implemented can vary from one BSP to another.

    Thursday, October 21, 2010 5:54 PM