This is the area to clarify hardware specification if there's anything unclear from the datasheet. If the specification is software related, please ask in the related software section.

SPI Interface and programming

MoAMoA New Member Posts: 13

I would like to interface the UP Board with a (Slave) SPI device, I have a few questions, as listed below:
1) According to the datasheet for the UP Board, the GPIO has all the electrical pins for SPI interfacing. Can someone confirm that the UP Board can indeed be used to interface with SPI devices?
2) Is there any SDK for programming the SPI interface? If so, where do I get the SDK from?
3) Can anyone with experience on programming the SPI interface comment on how easy/difficult the SDK usage is?

Thanks in advance,

MoA

Tagged:

Comments

  • DCleriDCleri Administrator, AAEON Posts: 1,058 admin

    You can see the information about the SPI pins available here:

    there are 2 spidev available on UP Board: spidev2.0 and spidev2.1

    You can use the kernel API to implement a userspace application/driver to control a slave device: https://www.kernel.org/doc/html/latest/spi/spidev.html

    If you need more complex API and access other Kernel interfaces not accessible from userspace, you would need to refer to this: https://www.kernel.org/doc/html/latest/spi/spi-summary.html
    and write your own driver to include and compile with your own kernel.

  • MoAMoA New Member Posts: 13

    Thanks DCleri

    I am not using Linux; I am using Windows 10. It is my understanding that there is already a SDK for Windows 10. In fact, I found the "UP-SDK-for-Windows-10-and-Windows-IoT.zip" file but I dont know if this include the APIs for the SPI.

    While on the subject, I am also interested to know if the SPI lines are designed for 3.3 volts or 5 volts operation; I just want to make sure I dont damage the GPIO Interface.

    Regards,

    Mo

  • DCleriDCleri Administrator, AAEON Posts: 1,058 admin

    Hi @MoA

    Thanks for the clarification.

    Our Windows SDK currently does not support SPI, you can read the supported I/O and platforms from the release notes: https://downloads.up-community.org/download/up-sdk-for-windows-10-and-windows-iot/

    We plan to release an updated version of the SDK by the end of Q3 2020 with SPI support. We will keep you posted.

  • MoAMoA New Member Posts: 13

    Thanks again,

    Our design is restricted to availability of the SPI SDK. We can design around having the SDK around September time frame. How sure is the availability of the SDK by the end of Q3-2020?

    Regards,
    Mo

  • garywgaryw New Member, Moderator, AAEON Posts: 33 admin

    @MoA
    We are doing new Up framework to support SPI windows APIs before end of third quarter, currently we have a temporary solution to enable SPI windows API, if you want to try it we can provide this temporary solution to you, thanks.

  • MoAMoA New Member Posts: 13

    I am certainly interested in testing the temporary solution. Please provide the temprary solution.
    Our backup plan in case we dont get the SPI working is to use I2C. The SDK supports I2C at the present time, correct?

  • rogertsai(AAEON)rogertsai(AAEON) New Member Posts: 225 ✭✭✭
    edited July 2

    @MoA
    For the temprary solution, please refer to the attached documents for details
    BTW, All signal pins (spi/gpio/i2c/pwm..) are designed for 3.3v only, and I2C is supported in SDK (UpBridge)

  • MoAMoA New Member Posts: 13

    I am looking for an example to demonstrate how to use the I2C. Where can I find this?
    Thanks in advance,
    Mo

  • MoAMoA New Member Posts: 13

    I looked at the material in SpiTestTool.zip. It looks like that this is actually an application someone developed; it is not a set of library that one can just use. But, I can see that it is possible to extract some of the code and make a library for reading and writing. So, my question is "what exactly will you be releasing in late Q3, a library or an example code, or what ..."
    Mo

  • garywgaryw New Member, Moderator, AAEON Posts: 33 admin

    @MoA
    SpiTestTool is developed by Microsoft, you can get from github https://github.com/ms-iot/samples/tree/develop/SpiTestTool
    SpiTestTool using windows API directly no need to installed UpFramework.
    UpFramework will support windows APIs later and no need BIOS modification in local machine.

  • MoAMoA New Member Posts: 13

    The link you mentioned in your response is for Windows 10 IOT Core, I am using regular Windows 10. Will the SpiTestTool work for Windows 10? Have you actuality used it for building an application?

Sign In or Register to comment.