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.

有关SRIO的Doorbell中断响应函数映射



您好!我在看论坛下载的K2_STK_DSP_v1.1.zip中的SRIO部分的代码,

其中 SRIO_Interrupts.c中的函数 interrupt void SRIO_Doorbell_ISR(),应该是Doorbell中断响应函数吧,

这个函数名是怎样被映射为Doorbell中断响应函数的呢?

根据我的理解,应该需要一个映射,注册这个函数的代码,可是没有找到。

请指教!

  • 同一个文件里

    Uint32 uiLow_pri_Q_host_event_num;
    void SRIO_Interrupts_Init(void)
    {
    /* Disable Global host interrupts. */
    gpCIC0_regs->GLOBAL_ENABLE_HINT_REG= 0;

    uiLow_pri_Q_host_event_num= 18;
    /*map INTD1 low priority queue channel 0 interrupt event to CIC0 out 18*/
    KeyStone_CIC_event_map(gpCIC0_regs, CSL_CIC0_QMSS_INTD_1_LOW_0, uiLow_pri_Q_host_event_num);

    /* Enable Global host interrupts. */
    gpCIC0_regs->GLOBAL_ENABLE_HINT_REG= 1;

    /*map SRIO doorbell interrupts to INT4.
    map message descriptor accumulation low priority channel 0 interrupt
    to INT5*/
    gpCGEM_regs->INTMUX1 =
    (CSL_C66X_COREPAC_SRIO_INTDST16_PLUS_N<<CSL_CGEM_INTMUX1_INTSEL4_SHIFT)|
    (CSL_C66X_COREPAC_CIC_OUT18<<CSL_CGEM_INTMUX1_INTSEL5_SHIFT);

    //enable INT4, 5
    CPU_interrupt_enable((1<<4)|(1<<5));

    interrupt_cfg.interrupt_map = interrupt_map;
    interrupt_cfg.uiNumInterruptMap =
    sizeof(interrupt_map)/sizeof(SRIO_Interrupt_Map);

    /*interrupt rate control is not used in this test*/
    interrupt_cfg.interrupt_rate= NULL;
    interrupt_cfg.uiNumInterruptRateCfg= 0;

    interrupt_cfg.doorbell_route_ctl= SRIO_DOORBELL_ROUTE_TO_DEDICATE_INT;

    srio_cfg.interrupt_cfg = &interrupt_cfg;

    }

  • 谢谢您的回复!

    还是不太明白,INT4是怎么触发 interrupt void SRIO_Doorbell_ISR()函数调用的,而不是触发别的函数。

  • 在这个例子中,直接采用手动写中断向量表的方式,中断向量表定义在 SRIO_vectors.asm 文件内,在此文件中用汇编将SRIO_Doorbell_ISR绑定到了INT4上。

  • 终于明白了,非常感谢!