This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

tcp3d到EDMA中断问题



任务是循环使用两个tcp3d译两个码块。在时刻a和b分别启动两个TCP3D译码,译码完成后通过edma传输结果并产生中断,如果在中断处加一个断点,则每次循环都可以得到正确的结果。但是拿去断点,则只进入中断一次(应该是第一个tcp3d在edma传输后触发的),但是第二个tcp3d在edma传输后并不能进入到edma中断,此时查看EDMA的IPR寄存器发现,相关的pending置位。这样下一次循环时,就连中断也进不去了。请问这是什么原因?谢谢了!

  • 首先确认相应EDMA Channel的IPR确实置位,然后在中断服务函数中需要情CPINTC system interrupt,可以调用CSL_CPINTC_clearSysInterrupt,然后清IPR,保证下一次中断事件被响应。

  • ok, 现在是另外一个问题,就是能进中断,但是IPR和IPRH的都为0,没有置位。按理说没有置位,应该不会进入到中断里来的。另外,中断ISR是通过EventCombiner_dispatchPlug(eventId, ISR, hostIntr[dspCoreID], TRUE)注册的。另外,中断ISR通过CpIntc_dispatchPlug 和 EventCombiner_dispatchPlug注册有什么区别?

  • 1. 如果IPR中相应bit没有置位,EDMA肯定不会产生中断,所以确认该中断是否是EDMA channel产生,确认IPR没有被清掉。

    2. 关于中断函数与相应中断矢量的映射配置,参考如下使用CSL_intcHookIsr,需要在工程中添加ti.csl.intc.ae66,在文件中加入相应的csl_intc.h。

    /* Intc variable declarartion */
    CSL_IntcObj DEMO_puschIntcObj;
    CSL_IntcHandle DEMO_puschHIntc;
    CSL_IntcEventHandlerRecord DEMO_puschEventHandler[8];
    CSL_IntcGlobalEnableState DEMO_puschIntcState;

    void DEMO_IntcConfig(void)
    {
    CSL_IntcParam vectId;
    CSL_IntcContext context;
    //!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!//
    //! GEM0 Intc Configuration !//
    //!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!//
    /* Setup the global Interrupt */
    context.numEvtEntries = 8;
    context.eventhandlerRecord = DEMO_puschEventHandler;
    CSL_intcInit(&context);
    /* Enable NMIs */
    CSL_intcGlobalNmiEnable();
    /* Enable Global Interrupts */
    CSL_intcGlobalEnable(&DEMO_puschIntcState);

    /* VectorID for the Global Edma Event */
    vectId = CSL_INTC_VECTID_4;

    /* Opening a handle for the ISR->EDMA Interrupt Event */
    DEMO_puschHIntc = CSL_intcOpen(&DEMO_puschIntcObj,
    CSL_GEM_INTC0_OUT_8_PLUS_16_MUL_N,
    &vectId,
    NULL);
    /* Hook the ISRs */
    CSL_intcHookIsr(vectId, &DEMO_ProcessOkISR);
    /* Clear the Interrupt */
    CSL_intcHwControl(DEMO_puschHIntc, CSL_INTC_CMD_EVTCLEAR, NULL);
    /* Enable the Event & the interrupt */
    CSL_intcHwControl(DEMO_puschHIntc, CSL_INTC_CMD_EVTENABLE, NULL);

    return;
    }

  • 确实是进入到了中断服务程序,在该服务程序中加个while循环一直读IPR、IPRH都为0。