Part Number: TMS320C6670
Other Parts Discussed in Thread: SYSBIOS
Hello!
My question should be very newbie, but I am resorting to forum after failing to solve that myself.
I am trying to develop EDMA app. Using CSL API I have configured the transfer on Channel Controller 0. The transfer should trigger completion interrupt on global region. To check, that transfer actually completes, I put polling loop right after transfer submission
CSL_Edma3CmdIntr regionIntr;
edma_intr_enable( hModule );
fpga_tx_edma_submit( &tx1 );
regionIntr.region = CSL_EDMA3_REGION_GLOBAL;
regionIntr.intr = 0;
regionIntr.intrh = 0;
/* Poll on interrupt pend bit 1 */
do
{
CSL_edma3GetHwStatus( lte->dma->hModule, CSL_EDMA3_QUERY_INTRPEND, ®ionIntr );
} while (!(regionIntr.intr));
Log_print1( Diags_USER1, "controller(): regionIntr.intr: %x", regionIntr.intr );
This piece of code prints 0x40 which matches expected TCC=6. However, ISR is not invoked and I want to trace down why.
First of all, in C6670 data sheet SPRUGH7, Table Table 7-39 CIC0 Event Inputs — C66x CorePac Secondary Interrupts I have found EDMA3CC0 EDMACC_GINT is Event# 36. Next, as this event is listed as secondary, I refer Figure 7-29 Interrupt Topology in the same data sheet and see that "117 Core-only Secondary Events" route through CIC0.
Next, in TMS320C66x DSP CorePac User Guide SPRUGW0B, Table 9-2 System Event Mapping, EDMA global interrupt is not hard mapped and needs to be programmed. Also I refer A.1 Debug Checklist in Keystone EDMA3 UG SPRUGS5B. Item 1) The interrupt generation is enabled in the OPT is OK, I have
cfg.option = CSL_EDMA3_OPT_MAKE
(
CSL_EDMA3_ITCCH_DIS, // itcchEn,
CSL_EDMA3_TCCH_DIS, // tcchEn,
CSL_EDMA3_ITCINT_DIS, // itcintEn,
CSL_EDMA3_TCINT_EN, // tcintEn,
6, // tcc,
CSL_EDMA3_TCC_NORMAL, // tccMode,
...
CSL_edma3ParamSetup( hdl, &cfg );
The second is 2) The interrupts are enabled in the EDMA3 Channel Controller, via the Interrupt Enable Registers (IER/IERH). For that I have
regionIntr.region = CSL_EDMA3_REGION_GLOBAL; regionIntr.intr = 0xC0; regionIntr.intrh = 0x0000; CSL_edma3HwControl( hModule, CSL_EDMA3_CMD_INTR_ENABLE, ®ionIntr );
Then, likely 3) The corresponding interrupts are enabled in the device interrupt controller is the root of my problem.
In my sysbios config I have
EventCombiner.eventGroupHwiNum[0] = 7; EventCombiner.eventGroupHwiNum[1] = 8; EventCombiner.eventGroupHwiNum[2] = 9; EventCombiner.eventGroupHwiNum[3] = 10; // Plug function and argument for event 31 then enable it. EventCombiner.events[36].fxn = '&edma_isr'; EventCombiner.events[36].arg = 36; EventCombiner.events[36].unmask = true;
So I believe event 36 which is EDMA global interrupt is connected with ISR. Event combiner puts event 36 on its output 1, which in turn, is tied with HWI 8. The latter is enabled too.
So once again, I thing that EDMA interrupt first enters CIC0, aka CpIntcC. So I put
hnd = CSL_CPINTC_open(0); // Opens CPINTC Instance 0 CSL_CPINTC_mapSystemIntrToChannel( hnd, CSL_INTC0_CPU_2_EDMACC_GINT, CSL_INTC0_CPU_2_EDMACC_GINT ); CSL_CPINTC_enableSysInterrupt(hnd, CSL_INTC0_CPU_2_EDMACC_GINT);
CSL_INTC0_CPU_2_EDMACC_GINT is 36 and I think I mapped system event 36 to channel 36, which is host interrupt 36. I expect, that Event combiner pick this event and trigger HWI, but that does not happen. Please help me to understand interrupt flow in this particular case.
Thanks in advance.

