i.MX8M Plus SDMA3

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

i.MX8M Plus SDMA3

Jump to solution
1,103 Views
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 Kudos
Reply
1 Solution
1,022 Views
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.

View solution in original post

0 Kudos
Reply
5 Replies
1,058 Views
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 Kudos
Reply
1,035 Views
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 Kudos
Reply
1,023 Views
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 Kudos
Reply
1,019 Views
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 Kudos
Reply
1,060 Views
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 Kudos
Reply