芯片型号:TMS320C6678CYP,芯片版本号:0x1009E02F(JTAG ID)
硬件环境:6678LEVM,仿真器型号:XDS560V2
CCS5.2.1 MSDK2_01_02_06;编译器:T1 V7.4.10
源码:
intcContextIPC.numEvtEntries = 0;
intcContextIPC.eventhandlerRecord = NULL;
CSL_intcInit(&intcContextIPC);
CSL_intcGlobalNmiEnable();
CSL_intcGlobalEnable(&state);
vectId = CSL_INTC_VECTID_4;
hIntcIPC = CSL_intcOpen(&intcObjIPC, 91, &vectId, NULL);
eventRecord.handler = &EventIpcHandler;
eventRecord.arg = 0;
CSL_intcPlugEventHandler(hIntcIPC,&eventRecord);
//CSL_intcHwControl(hIntcIPC,CSL_INTC_CMD_EVTCLEAR,NULL);
CSL_intcHwControl(hIntcIPC,CSL_INTC_CMD_EVTENABLE,NULL);
//CSL_intcClose(hIntcIPC);
问题描述:
1: EVTFLAG2中EF91已经置1,INTMUX1为0x0000005B,IER已经使能,GIE,NMIE均已使能。结果是IFR一直为0;
2:通过ISR置1,也未进入中断程序。
请各位大神帮忙解答下,谢谢。
Shine:
上面的配置代码运行后,在CCS里查看一下INTMUX1的值是多少?如果INTMUX1把event映射到INT4,那EVTFLAG2置1后,IFR.int4也会自动置1.
请问ISR是什么寄存器?IFR?
seareen xiao:
回复 Shine:
你好,EVTFLAG2的值为0x08000000,INTMUX1的值是0x0000005B,是映射到INT4的,但是IFR.int4未置1。
2.8.10 Interrupt Set Register (ISR)The interrupt set register (ISR) allows you to manually set the maskable interrupts(INT15-INT4) in the interrupt flag register (IFR). Writing a 1 to any of the bits in ISRcauses the corresponding interrupt flag (IFn) to be set in IFR. Writing a 0 to any bit inISR has no effect. You cannot set any bit in ISR to affect NMI or reset. The ISR is shownin Figure 2-10 and described in Table 2-14. See Chapter 6 ‘‘Interrupts’’ on page 6-1 formore information on interrupts.
Shine:
回复 seareen xiao:
请问有没有运行过mcsdk里的timer例程能进中断吗?
seareen xiao:
回复 Shine:
测试过,timer例程是可以进入中断的
Shine:
回复 seareen xiao:
那在timer中断的例程上修改,先把事件映射到INT4,可以了以后,在把中断事件改成想触发的事件。
seareen xiao:
回复 Shine:
将中断事件由CSL_GEM_TINTLN改为CSL_GEM_IPC_LOCAL后就不能进入中断了,太诡异了