DMAMUX configuration example for periodic triggering
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
โ2020-12-09 6:25 AM
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
Solved! Go to Solution.
Accepted Solutions
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
โ2021-01-11 2:34 AM
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
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
โ2020-12-09 8:55 AM
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
;)
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
โ2021-01-11 2:34 AM
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
