imx6q spidev_test loopback test no RX

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

imx6q spidev_test loopback test no RX

1,434 Views
jongjyhhsieh
Contributor I

my goal is run a loopback test on the spi device. 

So far, I configured pin map for SPI1 and SPI3 and enabled them on the board-specific file. 

I can see spi1.0 and spi3.0 device node under /dev/. 

I connected the SPI3's MISO to MOSI to run the loopback. 

For the testing application used spidev_test.c which is under kernel document and just modified the device name to spidev3.0.

when I run the test app, below is what I get, 

spi mode: 0
bits per word: 8
max speed: 500000 Hz (500 KHz)

00 00 00 00 00 00
00 00 00 00 00 00
00 00 00 00 00 00
00 00 00 00 00 00
00 00 00 00 00 00
00 00 00 00 00 00
00 00

I am expecting to get the same tx data for rx but I get 0 as above.

Let me know if anythig I have missed.

Thanks in advance, 

Labels (1)
0 Kudos
3 Replies

969 Views
zengyi7761
Contributor I

Hi,

    Have you solved this problem? I meet the same problem now......

0 Kudos

969 Views
pavleb
Contributor I

There was a bug in the pinctrl definitions in the mainline kernel.

Checkout this commit: 5040feb00c624e18c3a41c600883ab848c1f1f53

0 Kudos

969 Views
jimmychan
NXP TechSupport
NXP TechSupport

We have documentation for different version of Linux BSP.

i.MX 6 Series Software and Development Tool|NXP 

for example :            

In the documentation, there is i.MX_Linux_Reference_Manual.pdf

For the ECSPI, please read the Chapter 36. And 36.4 Unit Test for the test details.

0 Kudos