the i.MX6 issue of data that should not be received from SPI

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

the i.MX6 issue of data that should not be received from SPI

957 Views
massohy
Contributor II

Dear community member,

 

I have a issue on SPI in i.MX6 with yocto 3.14.52. I got a error transferring data via SPI as a master.

It is occurred in spi_imx_isr(). My software already complete to read all data, but rx_available() return true. So, spi_imx->txfifo will be minus, as a result, this function will return IRQ_HANDLED.

 

I added this code,

if(spi_imx->txfifo < 0) spi_imx->txfifo = 0;

but error was occurred again.

 

Please tell me why does rx_available() return true already data should be empty.

Or Is the patch existing to solve this problem?

 

Best regards,

Labels (1)
0 Kudos
Reply
1 Reply

862 Views
igorpadykov
NXP Employee
NXP Employee

Hi mas

one can test with spi unit test (folder ../mxc_spi_test) and

compare ecspi registers with custom application case

[meta-fsl-arm,16/27] imx-test: Upgrade to 5.3 version - Patchwork 

L3.14.52 Demo Image

i.MX 6QuadPlus, i.MX 6Quad, i.MX 6DualPlus, i.MX 6Dual, i.MX 6DualLite, i.MX 6Solo Linux Binary Demo...

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

0 Kudos
Reply