SDMA access from M4 core

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

SDMA access from M4 core

981 Views
LennartB
Contributor II

I'm trying to initialize the SDMA from the M4 core of the i.MX8M. I followed the steps from the  "i.MX 8M Dual/8M QuadLite/8M Quad Applications Processors Reference Manual", Rev. 3.1, 06/2021, pages 1101 - 1102. I configure channel 0 to copy the context data to ARM memory (i.e. channel 0 command "C0_GETCTXT"). Channel 0 seems to start and finishes as well (as indicated by STOP_STAT, contradictory with the reference manual, the SDMA_SDMA_INTR does not reflect this). However, no data seems to be written by the SDMA. I am using the TCM and even tried disabling the cache, but this doesn't influence the result.

Why is the context data not visible in ARM RAM?

Labels (1)
Tags (2)
0 Kudos
6 Replies

974 Views
ceggers
Contributor V

Why is the context data not visible in ARM RAM?

The SDMA has its own SRAM, this is distinct from the SRAMs of the ARM and the external DDR RAM. The RAM (and also the ROM, the SDMA core registers and parts of the status registers) is not visible from the ARM processor (e.g. these resources are directly tied to the SDMA CPU and not connected to any busses of the ARM).

<Advertising>With a SDMA debugger, you have full access to all resources of the SDMA</Advertising>

 

0 Kudos

969 Views
LennartB
Contributor II

Hi Christian,

Thanks for your prompt response.

I assumed that it is possible to use the "C0_GETCTXT" command to transfer the context from SDMA RAM to ARM RAM (just to see if it works). Otherwise it should be possible to use "C0_SETCTX" to do it the other way around, right?

I can try the "C0_SETCTX" command and see with the JTAG whether the SDMA RAM is affected.

Regards,

Lennart

0 Kudos

966 Views
ceggers
Contributor V

I can try the "C0_SETCTX" command and see with the JTAG whether the SDMA RAM is affected.

Yes, that's no problem. You can also debug the C0_SETCTX routine itself, but therefore the routine must be linked into RAM (no breakpoints can be set in ROM).

Do you own a JTAG Debugger from Lauterbach?

regards
Christian

0 Kudos

959 Views
LennartB
Contributor II

I am unfamiliar with debuggers from Lauterbach. Currently, I am using the Segger JLink for debugging the M4 core.

Best regards,
Lennart

0 Kudos

956 Views
ceggers
Contributor V

The Lauterbach debugger is the only I know where you can Debug the SDMA. Currently there are even two possibilities:

  1. Lauterbach offers SDMA support as a license option
  2. I have written an extension for SDMA myself (see Screenshot here).

regards,
Christian

0 Kudos

978 Views
ceggers
Contributor V

Hi Lennart,

at least the Linux driver doesn't use the interrupt for channel0, it uses busy-wait instead.

But there's nothing special about IRQs on channel0, if the IRQ bit in the mode field of the buffer descriptor is set, you should get an interrupt.

I have a JTAG debugger for the SDMA, it can help to debug such problems.

regards
Christian

0 Kudos