Simple program to test ( spi )

取消
显示结果 
显示  仅  | 搜索替代 
您的意思是: 

Simple program to test ( spi )

1,457 次查看
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 项奖励
回复
2 回复数

1,145 次查看
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 项奖励
回复

1,145 次查看
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 项奖励
回复