i.MX8M Plus SDMA3

取消
显示结果 
显示  仅  | 搜索替代 
您的意思是: 
已解决

i.MX8M Plus SDMA3

跳至解决方案
573 次查看
JakaKordez
Contributor II

 

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:

  • DRIVER_MASTER_SPI_DMA_BASE in cmsis_ecspi_sdma_loopback_transfer.c
  • RTE_SPI2_DMA_TX_DMA_BASE and RTE_SPI2_DMA_RX_DMA_BASE in RTE_Device.h

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.

0 项奖励
1 解答
492 次查看
JakaKordez
Contributor II

 

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.

在原帖中查看解决方案

0 项奖励
5 回复数
528 次查看
JakaKordez
Contributor II

 

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

0 项奖励
505 次查看
Dhruvit
NXP TechSupport
NXP TechSupport

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.

0 项奖励
493 次查看
JakaKordez
Contributor II

 

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.

0 项奖励
489 次查看
Dhruvit
NXP TechSupport
NXP TechSupport

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.

0 项奖励
530 次查看
Dhruvit
NXP TechSupport
NXP TechSupport

Hi @JakaKordez,

Could you please provide me with the BSP versions of u-boot and linux-imx that you are using?

 

Best Regards,
Dhruvit.

0 项奖励