Hi all,
Our custom platform based on iMX6SL meets troubles with SPI transactions. Actually it freezes in special scenario whereas it works very well otherwise.
Our environment is :
- Custom board with iMX6SL
- Linux based on FSL BSP 3.14.28
- Dev based on spidev
Our SPI is working with following scenarii, at any frequencies from 4 to 12MHz, on multiple endurance tests:
- Loop of transactions consisting in writing 1 Byte then reading 14 Bytes
- Loop of transactions consisting in reading 20x14 Bytes
Our SPI driver freezes after few transactions when :
- Loop of transactions consisting in writing 1 Byte then reading 20x14 Bytes
We observed that :
- Setting SPI bus frequency @ 12MHz seems to make it work, but it still freezes @ 10MHz / 8MHz / 6MHz / 4MHz
- Reducing the datasize to 15x14 makes it freeze in less than 1 minute
When it freezes, application cannot be killed manually, only way to get hand on SPI again is to reboot the board.
Is there any known issue on SPI driver with the couple iMX6SL <--> BSP 3.14.28?
Is there any maximum size for packet transactions?
Why writing 1 Byte before reading 20x14 Bytes makes SPI freeze whereas only reading 20x14 Bytes works perfectly?
Any help is welcome!
Thank you,
Samuel
Solved! Go to Solution.
Hi Samuel
please try latest 3.14.52 BSP:
Board Support Packages (29)
L3.14.52_1.1.0_MX6QDLSOLO (REV L3.14.52_1.1.0)
weird behaviour at different frequencies may be caused by
TKT238285, mentioned on :
https://community.freescale.com/message/482332#comment-482332
Software workaround integrated in Linux BSP codebase starting in release
imx_3.14.38_6qp_ga.
Best regards
igor
-----------------------------------------------------------------------------------------------------------------------
Note: If this post answers your question, please click the Correct Answer button. Thank you!
-----------------------------------------------------------------------------------------------------------------------
Hi Samuel
please try latest 3.14.52 BSP:
Board Support Packages (29)
L3.14.52_1.1.0_MX6QDLSOLO (REV L3.14.52_1.1.0)
weird behaviour at different frequencies may be caused by
TKT238285, mentioned on :
https://community.freescale.com/message/482332#comment-482332
Software workaround integrated in Linux BSP codebase starting in release
imx_3.14.38_6qp_ga.
Best regards
igor
-----------------------------------------------------------------------------------------------------------------------
Note: If this post answers your question, please click the Correct Answer button. Thank you!
-----------------------------------------------------------------------------------------------------------------------
Hi Igor,
Sorry for being so long to answer but upgrading kernel was not so straightforward. We needed to include custom patches from our legacy as well.
Finally, it seems to have fixed part of the problem. Before, SPI froze systematically on large transaction TX+RX. Now it works well on endurance tests but sometimes we still meet this SPI freezing, then the kernel seems stucked, we cannot kill our application at all. So I feel like it still come from kernel space and from our user code.
To sum up, it is much better but bug still appears sometimes and is hard to reproduce...
Any other lead?
Thanks again,
Samuel