SPI Interface and programming
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
Comments
-
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. -
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
-
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.
-
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 -
@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. -
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? -
@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) -
I am looking for an example to demonstrate how to use the I2C. Where can I find this?
Thanks in advance,
Mo -
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 -
@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. -
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?