SPI slave mode on imx6UL not working properly

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

SPI slave mode on imx6UL not working properly

743 Views
surriya-luavan
Contributor I

I am using two iMX6UL processor for both master and slave:

I am using the spidev_test application to verify the slave operation:

The data sent from the slave is being received at the master, but, the data is spaced out with empty bits and takes 4 times the data to be sent from the master to receive the data from slave. I.e., For ex, I have to send 64 bytes from master (run spidev_test four times) to get the 16 bytes of data from the slave, and the data received also misses some data and is filled with empty bits in between. I’ll attach the screenshot of the master and slave console during testing to give you a better picture of what’s happening.

Left- Master and Right-SlaveLeft- Master and Right-Slave

The one to the left is master and the one to the right is slave. These results are repeatable and there is a pattern that I could see. I have adjusted the maximum frequency in both the device tree and spidev_test arguments, but can see the same thing happening. Is there something I am missing out on?

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

662 Views
surriya-luavan
Contributor I

Actually, there is a recent patch fix to the spi-imx, which I wasn't updated to (Was using Toradex BSP). The AN13633 application note was quite helpful with diagnosing the problem. Thank you

0 Kudos
Reply