Route DMA Done signal through XBAR1

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

Route DMA Done signal through XBAR1

2,493 Views
glaukos
Contributor II

Hi,

I'm trying to route a DMA_DONE signal through the Crossbar on a RT1064. The Crossbar has 8 DMA_DONE inputs (XBAR1_IN64 to XBAR1_IN71) named DMA_DONE0 to DMA_DONE7.

However, this MCU has 32 DMA channels. How are these 32 channels mapped to 8 DONE signals? I can't find anything about that in the documentation.

Second, does the DMA_DONE signal reflect the state of the DONE flag in the CSR register of the TCD?

Third, I am routing the XBAR signal to a show pin:

XBARA_SetSignalsConnection(XBARA1, kXBARA1_InputDmaDone2, XBARA1_OutputIomuxXbarInout11);

 and have DMA channel 2 set up to trigger cyclically. However, the pin stays low. I have tried all other Done signals as well. Please help.

Labels (1)
0 Kudos
Reply
6 Replies

1,808 Views
alonbl
Contributor III

Hello @glaukos,

I have a similar requirement to intercept DMA done and trigger QTMR.

Have you succeeded in reroute the DMA done? have you figured out what is the mapping between the actual DMA channels and XBAR?

Thanks,

0 Kudos
Reply

1,766 Views
glaukos
Contributor II

Hello @alonbl,

to be honest I don't quite remember what my conclusion was. I think at some point I figured out that DMA_DONE was not a signal originating in eDMA, and therefore does not map to the 32 DMA channels at all. The signal is rather generated by either DMAMUX or the Crossbar itself and was therefore only usable on DMA MUX channel 30, 31, 94, 95. I think there was a fixed mapping of those four channels to four of the DMA_DONE signals, although I cannot tell you what the remaining four DMA_DONE signals are mapped to.

In the end I realized that DMA_DONE was not helpful for my use case and I moved on to a different solution.

Take this information with a grain of salt, but I hope it helps.

 

0 Kudos
Reply

1,762 Views
alonbl
Contributor III

Thank you @glaukos ,

This is helpful information.

Regards,

0 Kudos
Reply

2,448 Views
glaukos
Contributor II

Hi @jingpan ,

thank you for your reply. Unfortunately I am still struggling to make progress.

XBARA has 4 connections that can trigger DMA requests. They are connected to DMAMUX channels 30, 31, 94 and 95. I can't find any references to DMAMUX channels originating from XBARB.

My DMA transfer is now routed through XBARA (XBARA1_OUT0) to DMAMUX channel 30, which I assume corresponds to dma_done0? However, the done signal appears to stay low.

 

Kind regards

glaukos

0 Kudos
Reply

2,423 Views
jingpan
NXP TechSupport
NXP TechSupport

Hi @glaukos ,

You can test this on xbara example in SDK. Merge a DMA example in it.

    XBARA_Init(DEMO_XBARA_BASEADDR);

    /* Configure the XBARA signal connections. */
    XBARA_SetSignalsConnection(DEMO_XBARA_BASEADDR, DEMO_XBARA_USER_CHANNEL_INPUT, DEMO_XBARA_USER_CHANNEL_OUTPUT);

    /* Configure the XBARA interrupt. */
    xbaraConfig.activeEdge  = kXBARA_EdgeRising;
    xbaraConfig.requestType = kXBARA_RequestDMAEnable;
    XBARA_SetOutputSignalConfig(DEMO_XBARA_BASEADDR, DEMO_XBARA_USER_CHANNEL_OUTPUT, &xbaraConfig);

    xbaraConfig.requestType = kXBARA_RequestInterruptEnalbe;
    XBARA_SetSignalsConnection(DEMO_XBARA_BASEADDR, kXBARA1_InputDmaDone0, kXBARA1_OutputDmaChMuxReq94);
    XBARA_SetOutputSignalConfig(DEMO_XBARA_BASEADDR, kXBARA1_OutputDmaChMuxReq94, &xbaraConfig);
    /* Enable at the NVIC. */
//    EnableIRQ(DEMO_XBARA_IRQn);
    EnableIRQ(XBAR1_IRQ_2_3_IRQn);

Be careful that DENn and IENn should not be set to 1 at the same time for the same
output XBAR_OUT[n].

 

Regards,

Jing

0 Kudos
Reply

2,472 Views
jingpan
NXP TechSupport
NXP TechSupport

Hi @glaukos ,

For each XBAR (XBARA and XBARB), the first four pins: XBAR_OUT0~3 pin all can trigger DMA requests.  These dma_done0 ~dma_done7 signals are the completing indicator of the above 8 trigger source. 

 

Regards,

Jing

0 Kudos
Reply