Reply by Brad Griffis April 2, 20072007-04-02
edwin82@gmail.com wrote:
> Hi, > > I am working on the EDMA on C6713 DSK. I am trying to make a EDMA > interrupt when the transfer has completed, instead of polling by the > while loop "while (!EDMA_intTest(TCC))". > > The following is my code: > > ... > EDMA_config(hEdma, &cfgEdma); > EDMA_intClear(15); > EDMA_intEnable(4); > EDMA_enableChannel(hEdma); > > > interrupt void edma_isr() > { > IRQ_clear(IRQ_EVT_EDMAINT); > EDMA_intClear(15); > EDMA_disableChannel(hEdma); > EDMA_intDisable(4); > EDMA_close(hEdma); > } > > void main() > { > ... > HWI_enable(); > IRQ_globalEnable(); > IRQ_enable(IRQ_EVT_EDMAINT); > } > > However, the edma_isr() was not triggered, is there something wrong or > missing ? >
There are two levels at which you need to enable interrupts for the EDMA. At the level of the interrupt controller there is a shared EDMA interrupt. That would be enabled through the IER. Since there are 32 EDMA channels there is a shared interrupt for the EDMA. The registers of interest are CIPR and CIER. If you understand how IFR and IER work, then this is analogous. The CIPR is where an interrupt gets latched, but only if the corresponding CIER bit is set will it actually trigger an interrupt. It looks like you programmed TCC=15. I don't want to dive into all the CSL code right this second, but it looks to me like EDMA_intClear(15) is clearing bit 15 of CIPR. You *should* be following that up with EDMA_intEnable(15) to enable bit 15 of CIER. However, it looks like you're confusing the two levels of interrupt handling. When you're using DSP/BIOS for interrupts you can do one of two things: 1) Use the dispatcher, but do *not* use the interrupt keyword for your ISR. 2) Don't use the dispatcher, but use the interrupt keyword. Brad
Reply by March 27, 20072007-03-27
On Mar 27, 1:03 am, "PARTICLEREDDY (STRAYDOG)"
<particlere...@gmail.com> wrote:
> wait, > i dont remember exactly..i think there should be some > initialization for EDMA also..and by the way..try the > configure..through DSP BIOS rather than writing program for settings > in the EDMA and also..try to see whether you have mapped HWI to EDMA > ISR..and use example program or look for help in document of Ti. > Anways i will also look through for reason why?? > > regards > particlereddy > > On Mar 26, 3:12 pm, edwi...@gmail.com wrote: > > > > > Hi, > > > I am working on the EDMA on C6713 DSK. I am trying to make a EDMA > > interrupt when the transfer has completed, instead of polling by the > > while loop "while (!EDMA_intTest(TCC))". > > > The following is my code: > > > ... > > EDMA_config(hEdma, &cfgEdma); > > EDMA_intClear(15); > > EDMA_intEnable(4); > > EDMA_enableChannel(hEdma); > > > interrupt void edma_isr() > > { > > IRQ_clear(IRQ_EVT_EDMAINT); > > EDMA_intClear(15); > > EDMA_disableChannel(hEdma); > > EDMA_intDisable(4); > > EDMA_close(hEdma); > > > } > > > void main() > > { > > ... > > HWI_enable(); > > IRQ_globalEnable(); > > IRQ_enable(IRQ_EVT_EDMAINT); > > > } > > > However, the edma_isr() was not triggered, is there something wrong or > > missing ?- Hide quoted text - > > - Show quoted text -
Yes, I have mapped the edma_isr with the HWI_INT8 event which has the interrupt source "EDMA_Controller" in BIOS. Since I don't know what is the meaning of "use dispatcher" and the keyword "interrupt" before the ISR function name ("interrupt void edma_isr()"), I tried with/without the "use dispatcher" and with/ without the keyword "interrupt", the results are same. The following is my channel config, you can see that I have already enabled the TCINT and set the TCC=15. cfgEdma.opt = (Uint32) ( (EDMA_OPT_PRI_HIGH << _EDMA_OPT_PRI_SHIFT ) | (EDMA_OPT_ESIZE_32BIT << _EDMA_OPT_ESIZE_SHIFT) | (EDMA_OPT_2DS_YES << _EDMA_OPT_2DS_SHIFT ) | (EDMA_OPT_SUM_INC << _EDMA_OPT_SUM_SHIFT ) | (EDMA_OPT_2DD_YES << _EDMA_OPT_2DD_SHIFT ) | (EDMA_OPT_DUM_NONE << _EDMA_OPT_DUM_SHIFT ) | (EDMA_OPT_TCINT_YES << _EDMA_OPT_TCINT_SHIFT) | (EDMA_OPT_TCC_OF(15) << _EDMA_OPT_TCC_SHIFT ) | (EDMA_OPT_LINK_NO << _EDMA_OPT_LINK_SHIFT ) | (EDMA_OPT_FS_NO << _EDMA_OPT_FS_SHIFT )); cfgEdma.src = (Uint32)&src; cfgEdma.dst = (Uint32)0xA0000000; cfgEdma.cnt = (Uint32)( ((M-1)<<16) | N ); cfgEdma.idx = (Uint32)( (4*N)<<16 );
Reply by PARTICLEREDDY (STRAYDOG) March 26, 20072007-03-26
wait,
      i dont remember exactly..i think there should be some
initialization for EDMA also..and by the way..try the
configure..through DSP BIOS rather than writing program for settings
in the EDMA and also..try to see whether you have mapped HWI to EDMA
ISR..and use example program or look for help in document of Ti.
Anways i will also look through for reason why??

regards
particlereddy


On Mar 26, 3:12 pm, edwi...@gmail.com wrote:
> Hi, > > I am working on the EDMA on C6713 DSK. I am trying to make a EDMA > interrupt when the transfer has completed, instead of polling by the > while loop "while (!EDMA_intTest(TCC))". > > The following is my code: > > ... > EDMA_config(hEdma, &cfgEdma); > EDMA_intClear(15); > EDMA_intEnable(4); > EDMA_enableChannel(hEdma); > > interrupt void edma_isr() > { > IRQ_clear(IRQ_EVT_EDMAINT); > EDMA_intClear(15); > EDMA_disableChannel(hEdma); > EDMA_intDisable(4); > EDMA_close(hEdma); > > } > > void main() > { > ... > HWI_enable(); > IRQ_globalEnable(); > IRQ_enable(IRQ_EVT_EDMAINT); > > } > > However, the edma_isr() was not triggered, is there something wrong or > missing ?
Reply by March 26, 20072007-03-26
Hi,

I am working on the EDMA on C6713 DSK. I am trying to make a EDMA
interrupt when the transfer has completed, instead of polling by the
while loop "while (!EDMA_intTest(TCC))".

The following is my code:

...
EDMA_config(hEdma, &cfgEdma);
EDMA_intClear(15);
EDMA_intEnable(4);
EDMA_enableChannel(hEdma);


interrupt void edma_isr()
{
	IRQ_clear(IRQ_EVT_EDMAINT);
	EDMA_intClear(15);
	EDMA_disableChannel(hEdma);
	EDMA_intDisable(4);
	EDMA_close(hEdma);
}

void main()
{
...
	HWI_enable();
	IRQ_globalEnable();
	IRQ_enable(IRQ_EVT_EDMAINT);
}

However, the edma_isr() was not triggered, is there something wrong or
missing ?