Intel® Quartus® Prime Software
Intel® Quartus® Prime Design Software, Design Entry, Synthesis, Simulation, Verification, Timing Analysis, System Design (Platform Designer, formerly Qsys)

C program to control SPI

nsuggula
Beginner
1,106 Views

Hello,

 

I am using Cyclone V , DE-10 standard SOCFpga 

I created a project to implement spi communication so i implemented in two ways
using "spi (4 wire) intel fpga IP." and SPI slave to avalon master.

Please check the image below

nsuggula_0-1702366021477.png

 

Compiled the project and created rbf file and header file. Please help me how to use the spi module available now on FPGA. I wrote the C program to control the SPI (4 wire )  which is also available in attached zip file. I used the header files available in E:\intelFPGA_lite\22.1std\ip\altera\sopc_builder_ip\altera_avalon_spi. but when i compile the the spi_test.c with altera_avalon_spi.c i  get the below error message 

nsuggula_1-1702366389118.png

 

Please let me know the solution or please point out anything if I am doing wrong.

 

How can i use SPI slave to avalon master. 

I also attacjed full project zip file below.

Thank you 

Labels (1)
0 Kudos
3 Replies
JingyangTeh
Employee
1,028 Views

Hi nsuggula


For using of the SPI device in the linux environment you do not need to compile the driver into your c code.

You could just add the device into the device tree and select the correct linux driver and it will appear in the linux /dev directory.


If you are happening to be developing in baremetal you could follow the guide here to setup the cross compiler.

https://www.rocketboards.org/foswiki/Documentation/HWLib


Regards

Jingyang, Teh


0 Kudos
JingyangTeh
Employee
988 Views

Hi nsuggula


Any update on this case?


Regards

Jingyang, Teh


0 Kudos
JingyangTeh
Employee
902 Views

Hi


Since there are no feedback for this thread, I shall set this thread to close pending. Please login to ‘https://supporttickets.intel.com’, view details of the desire request, and post a feed/response within the next 15 days to allow me to continue to support you. After 15 days, this thread will be transitioned to community support. The community users will be able to help you on your follow-up questions.


If you happened to close this thread you might receive a survey. If you think you would rank your support experience less than 4 out of 10, please allow me to correct it before closing or if the problem can’t be corrected, please let me know the cause so that I may improve your future service experience.


Regards

Jingyang, Teh


0 Kudos
Reply