How to use SPI signals of IMX6 in application programs

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

How to use SPI signals of IMX6 in application programs

1,006 Views
srinivasaporam
Contributor II

Hi,

We have connected IMX6QD board to sensor through SPI. Now, We are writing application program to write  or read data from the sensor.

We need to use the SPI signals of  IMX6QD in the application program.

for ex: EIM_D18__ECSPI1_MOSI, if we want to use this signal. How can we use in application program (c program).

Labels (3)
0 Kudos
2 Replies

712 Views
srinivasaporam
Contributor II

Hi,

I have got application program (.c file ) from one of the sensor vendor in which it is given as below

#define SDI p3_7

#define SDO p4_6

where p3_7 and p4_6 are port3 bit7 and port4bit6 of one of the MCU(microcontroller). Now we would like to replace this microcontroller with IMX6Q or IMX6D.

Now, if I would like define then,

#define SDI A

#define SDO B

then what should be A and B

0 Kudos

712 Views
igorpadykov
NXP Employee
NXP Employee

Hi Srinivasa

application program uses standard linux SPI subsystem.

https://www.kernel.org/doc/Documentation/spi/spi-summary

[RESEND][PATCH] SPI: Add SPI driver for most known i.MX SoCs

example of usage : mxc_spi_test

http://repository.timesys.com/buildsources/i/imx-test/imx-test-3.14.28-1.0.0/

For configuring particular pins one can look at Chapter 2 Configuring the IOMUX Controller

attached Porting Guide.

Best regards

igor

-----------------------------------------------------------------------------------------------------------------------

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

-----------------------------------------------------------------------------------------------------------------------

0 Kudos