Imx6 - Configuring SPI in Application Level

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Imx6 - Configuring SPI in Application Level

736 Views
narreddiprakash
Contributor II

Hello,

I am using IMX6-duallite-A9 SOC for accessing a tuner via SPI-3 in that SOC.

My query is regarding to use SPI in user level application like configuring SPI in application itself and then exchanging data.

1. What are the dependencies to use SPI_3.? (I had done PIN Muxing, Clock enabled (CCM_CCGR1 register) I also enabled GPIO2_IO6 pin as an interrupt pin to transmit data from SPI_3).

2. Is it necessary to enable the SPI_3 in DTS for application level use.?

The code is attached at attachments, please refer.

Please respond as soon as possible

Labels (1)
Tags (1)
0 Kudos
1 Reply

484 Views
Carlos_Musich
NXP Employee
NXP Employee

Hi,

In the following document, I explain the way in which I developed a SPI driver in Application Level. You will find it helpful, you just need to adapt the read and write functions to communicated with your device.

Interfacing FXLS8471Q with i.MX6Q 

On the other hand, in the following thread I explain how to enable the spidev driver including the device tree and how to test it. This will be helpful too.

How to check if SPI is working? 


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

0 Kudos