-
Notifications
You must be signed in to change notification settings - Fork 3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
SPI does not work in revision 120 of mbed. #1754
Comments
+1. Ran into this using Neil Thiessen's SDFileSystem. |
FYI, the program hangs in DSPI_MasterWriteDataBlocking(), which is a KSDK 2.0 function (http://kex.nxp.com/apidoc/2.0/group__dspi.html#ga70a0f7d7fe2fbce7993bbcc8c427b2b0). The thing that seems odd to me is that KSDK 2.0 hasn't been released for the K64F, only for the KS22 processor line. I also notice that the file mbed/libraries/mbed/targets/hal/TARGET_Freescale/TARGET_KSDK2_MCUS/TARGET_K64F/spi_api.c is identical to TARGET_K22F/spi_api.c. Is that a mistake? Is it possible that the K64F code is using the wrong implementation of the KSDK libraries, at least for the SPI driver? |
I have run into other K64F issues with mbed v120. Reference:
Q: Also, will the internal mbed Ethernet ever recognize the "link()" function for the K64F? ...kevin |
Although there are only a few "pre-built" sdks listed, I have just built one for myself, and I'm going to check moto |
Is there any update on the K64F issues? |
I tried find for both SDK_2.0_FRDM-K22F and SDK_2.0_FRDM-K64F and there was no spi_api.c. |
cc @mmahadevan108 Please have a look The layout is not the best as the moment. Some files might be the same. In this case K22 and K64F might have same spi peripheral, but KL27Z does not, and all of these are under ksdk. It might be better to have the implementation based on the peripherals. In this case, it's dspi vs spi. Thus dspi driver would be used by nxp chips which contain dspi peripheral. this is however not a problem of this issue, we should discuss this in another one. I'll talk to Mahesh about it. Could you please run spi test here in the codebase ? I'll check hte test resutl, I did not notice SPI test fails for k64f. cc @bridadan - hw tests for k64f :-) |
As I wrote, the first byte write and read works fine, therefore it might have been difficult to capture the problem unless you ran multiple transactions test. Meantime, since the first byte write/read worked, it took us rather long time to figure out the cause of hang was SPI, instead of our application code. |
This PR should fix it - #1817 |
I have just tested my test_spi program on FRDM-K64F with mbed lib 121. |
Yes, you can use mbed-dev and update SPI based on the fix I referenced above. The fix will be part of the next mbed release. |
We shall close it, if you think it's still present on the master, please reopen |
With revision 120 of mbed, SPI does not work correctly with FRDM-K64F.
The first byte write worked successfully with correct return(read) value, but following write causes the program hang.
Same project worked fine with previous revision(s) and FRDM-KL25Z.
Tested with following programs.
https://developer.mbed.org/users/Rhyme/code/oscilloscope/
https://developer.mbed.org/users/Rhyme/code/test_spi/
The text was updated successfully, but these errors were encountered: