Skip to main content
CoolMo
Associate II
December 9, 2020
Solved

DMAMUX configuration example for periodic triggering

  • December 9, 2020
  • 2 replies
  • 1234 views

Hi all,

I seem not to be able to achieve periodic DMA transfers using DMAMux periodic triggering functionality.

I read on SPC574Kx reference manual that (§7.3.9.2)

  • DMAMUX1 receives PIT_0 Trigger 0-4
  • DMAMUX2 receives PIT_0 Trigger 5

and that (Table44):

  • PIT_0 periodic trigger 1 is mapped to DMA channel 9

Now, suppose I have configured PIT_0 channel 1 to be my periodic source, I should then set my eDMA transfer control descriptor data in DMA_0.TCD[9]

my DMACHMUX config is:

DMACHMUX_1.CHCONFIG[1].B.ENBL = FALSE; //§ 25.3.1

DMACHMUX_1.CHCONFIG[1].B.SOURCE = 0;

DMACHMUX_1.CHCONFIG[1].B.TRIG = TRUE;

DMACHMUX_1.CHCONFIG[1].B.ENBL = TRUE;

Am I correct?

Unfortunately I cannot get the dma channel service to start upon PIT timer expiration.

What am I missing?

Is there a configuration example available somewhere?

Thanks in advance,

M

    This topic has been closed for replies.
    Best answer by Giuseppe DI-GIORE

    Hello,

    your analysis is correct:

    • Use Always-On as source
    • Configure the PIT and the specific channel as trigger
    • Set the trigger bit in DMAMUX configuration

    In the coming update (beginning of February) of SPC5Studio (link) there will be a specific demo about DMA triggering configuration and usage.

    The name of the demo is:

    • SPC584Bxx_RLA PIT triggers DMA Test Application for Discovery

    Attached the main.c for this demo.

    Regards,

    Giuseppe

    2 replies

    CoolMo
    CoolMoAuthor
    Associate II
    December 9, 2020

    my fault:

    DMACHMUX_1.CHCONFIG[1].B.SOURCE = 59U;

    // just use an "ALWAYS ON" source on the specific DMAMUX.... (see §7.3.9.3 Table43)

    // the always on source serves as a gating signal and to allow

    // trigger pulses form PIT_0.Ch1 start the eDMA channel

    ;)

    Giuseppe DI-GIORE
    ST Employee
    January 11, 2021

    Hello,

    your analysis is correct:

    • Use Always-On as source
    • Configure the PIT and the specific channel as trigger
    • Set the trigger bit in DMAMUX configuration

    In the coming update (beginning of February) of SPC5Studio (link) there will be a specific demo about DMA triggering configuration and usage.

    The name of the demo is:

    • SPC584Bxx_RLA PIT triggers DMA Test Application for Discovery

    Attached the main.c for this demo.

    Regards,

    Giuseppe