Simple program to test ( spi )

cancel
Showing results for 
Search instead for 
Did you mean: 

Simple program to test ( spi )

352 Views
hamzadardour
Contributor II

Hello World,

I want to write a simple program to test the spi on my board ( mars board imx6 ) but I don't know how !!!

I read the documentation for the spi on ( https://www.kernel.org/doc/Documentation/spi/spi-summary ) and also the file ( spi.h) but I don't know the fonctions and the variables that I have to use.

can someone show me a simple example, to send a data for example (  to visual that with a scop ) .

Thanks,

0 Kudos
2 Replies

40 Views
SergioSolis
NXP Employee
NXP Employee

You could use the SPI driver in our BSP as an example, I don't know of another example we may have.

You may use the driver available for our SABRE board; provided that you configure them for your particular configuration. You may download the Linux Source package for the SABRE from our website, which has the code for all drivers in our board.

You can find the Source package on this link under Run-time Software.

http://www.freescale.com/webapp/sps/site/prod_summary.jsp?code=RDIMX6SABREBRD&fpsp=1&tab=Design_Tool...


Best regards,
Sergio

-----------------------------------------------------------------------------------------------------------------------
Note: If this post answers your question, please click the Correct Answer button. Thank you!
-----------------------------------------------------------------------------------------------------------------------

0 Kudos

40 Views
hamzadardour
Contributor II

Thank you SerchMX,

But I have already wrote the driver, and now I want to create a program for user space to use the spi and send data from a Master to a Slave, and I don't know how I can do that.

0 Kudos