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.

关于6678 system interrupt 映射到channel的问题



/* We now map System Interrupt 0 - 3 to channel 3 */

CSL_CPINTC_mapSystemIntrToChannel (hnd, 0 , 2);
CSL_CPINTC_mapSystemIntrToChannel (hnd, 1 , 4);
CSL_CPINTC_mapSystemIntrToChannel (hnd, 2 , 5);
CSL_CPINTC_mapSystemIntrToChannel (hnd, 3 , 3);

各位工程师好!

我的疑问是这里把system interrupt 0-3 映射到 channel 3,为什么CSL_CPINTC_mapSystemIntrToChannel中的channel值是2,4,5,3。

下面是函数定义和用到的寄存器,我认为这些是有关系的,请各位工程师帮助解释!

Thank you in advance!

CSL_CPINTC_mapSystemIntrToChannel函数定义

CSL_IDEF_INLINE void CSL_CPINTC_mapSystemIntrToChannel
(
CSL_CPINTC_Handle hnd,
CSL_CPINTCSystemInterrupt sysIntr,
CSL_CPINTCChannel channel
)
{

#ifdef _LITTLE_ENDIAN
((CSL_CPINTC_RegsOvly)hnd)->CH_MAP[sysIntr] = channel;
#else
((CSL_CPINTC_RegsOvly)hnd)->CH_MAP[(sysIntr&~3) + (3-(sysIntr&3))] = channel;
#endif
return;
}

通道映射寄存器(CH_MAP_REGx)

  • 注释与代码不一致,如果要把system interrupt全部映射到out channel3,则CSL_CPINTC_mapSystemIntrToChannel的第三个参数应该是3.

    CSL_CPINTC_mapSystemIntrToChannel函数的第二个输入参数是CIC输入事件ID,第三个参数是CIC out channel ID.

  • 请问可以将同一个system Interrupt event ID映射到多个不同的Channel ID吗?如将CIC输入事件ID=1分别映射到channel ID = 64,74, 84,94 ?

    CSL_CPINTC_mapSystemIntrToChannel (hnd, 1 , 64);
    CSL_CPINTC_mapSystemIntrToChannel (hnd, 1 , 74);
    CSL_CPINTC_mapSystemIntrToChannel (hnd, 1 , 84);
    CSL_CPINTC_mapSystemIntrToChannel (hnd, 1 , 94);