I tried the provided CMSIS example from the M7 SDK (cmsis_ecspi_sdma_loopback_transfer) and it is working well, utilizing SPI2 and SDMA1. Since SDMA1 is already used by Linux I would like to switch to SDMA3 which is reserved for the M7. I tried changing the definitions in the mentioned example:
but the example stopped working. It finishes the DRIVER_MASTER_SPI.Transfer call but never executes the transfer. There is no output on the SPI pins and the ECSPI_MasterSignalEvent_t is never called.
Is it possible to use SPI with SDMA3?
Do I have to change any other definition to use SDMA3 instead of SDMA1?
Is there some additional clock that needs to be enabled?
PS. I tried also with SDMA2 and had the same issue.
解決済! 解決策の投稿を見る。
I am sorry, there is no spl.c file in the mentioned folder in our Linux source.
In the meantime I think I already figured out the answers to my questions. Based on the memory map of i.MX 8M Plus reference manual (chapter 2.4), only the SDMA1 has SPI devices mapped to its address space. SDMA2 and SDMA3 are reserved for audio interfaces.
Hi @Dhruvit ,
The BSP is from the Avnet Embedded board i.MX8M Plus:
- U-boot version is 2021.04-5.10.35-2.0.0
- Linux kernel version is 5.10.35-lts-5.10.y
Best regards
Jaka
Hi @JakaKordez,
Could you please try changing the following for SDMA1,
Kindly comment the "CONFIG_IMX8MP" from two lines of the "/arch/arm/mach-imx/spl.c" file.
#Line No. 350 and #Line No. 416:
#if defined(CONFIG_IMX8MP) || defined(CONFIG_IMX8MN)
And comment out the i.MX8MP part:
#if /*defined(CONFIG_IMX8MP) || */ defined(CONFIG_IMX8MN
Best Regards,
Dhruvit.
I am sorry, there is no spl.c file in the mentioned folder in our Linux source.
In the meantime I think I already figured out the answers to my questions. Based on the memory map of i.MX 8M Plus reference manual (chapter 2.4), only the SDMA1 has SPI devices mapped to its address space. SDMA2 and SDMA3 are reserved for audio interfaces.
Hi @JakaKordez,
Sorry for not specifying earlier, but the spl.c was referenced for the u-boot source.
Note: If the query has been resolved please accept the reply as the solution!
Thank you,
Best Regards,
Dhruvit.
Hi @JakaKordez,
Could you please provide me with the BSP versions of u-boot and linux-imx that you are using?
Best Regards,
Dhruvit.