/* 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)
、
Yusheng Chen:
回复 Andy Yin1:
请问可以将同一个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);