如题:
设置了两个中断,1> XINT1_ISR (INT1.4)
以及 2> EPWM1_INT_ISR (INT3.1)
分别在对应中断处理中,加入IO翻转,测试中断时序。
由于XINT1_ISR中断优先级高,理论上当XINT1_ISR退出中断后,EPWM中断才能触发且对应IO电平拉高,
但是实际上,在XINT1_ISR中断执行期间,EPWM中断也触发了:出现了XITN1_ISR中断挂起,执行EPWM中断的过程,
请问有人知道是啥原因吗?
中断优先级采用默认的
// INT 1.4
void XINT1_ISR(void)
{
// Insert ISR Code here
GpioDataRegs.GPBSET.bit.GPIO32 = 1;
test();
GpioDataRegs.GPBCLEAR.bit.GPIO32 = 1;
// To receive more interrupts from this PIE group, acknowledge this interrupt
PieCtrlRegs.PIEACK.all = PIEACK_GROUP1;
}
// INT 3.1
void EPWM1_INT_ISR(void) // EPWM-1
{
GpioDataRegs.GPASET.bit.GPIO27 = 1;//
TEST1();
GpioDataRegs.GPACLEAR.bit.GPIO27 = 1;//
// Clear INT flag for this timer
EPwm1Regs.ETCLR.bit.INT = 1;
// To receive more interrupts from this PIE group, acknowledge this interrupt
PieCtrlRegs.PIEACK.all = PIEACK_GROUP3;
}
user1787896:
回复 onebyte:
TKS,就是中断嵌套了
如题:
设置了两个中断,1> XINT1_ISR (INT1.4)
以及 2> EPWM1_INT_ISR (INT3.1)
分别在对应中断处理中,加入IO翻转,测试中断时序。
由于XINT1_ISR中断优先级高,理论上当XINT1_ISR退出中断后,EPWM中断才能触发且对应IO电平拉高,
但是实际上,在XINT1_ISR中断执行期间,EPWM中断也触发了:出现了XITN1_ISR中断挂起,执行EPWM中断的过程,
请问有人知道是啥原因吗?
中断优先级采用默认的
// INT 1.4
void XINT1_ISR(void)
{
// Insert ISR Code here
GpioDataRegs.GPBSET.bit.GPIO32 = 1;
test();
GpioDataRegs.GPBCLEAR.bit.GPIO32 = 1;
// To receive more interrupts from this PIE group, acknowledge this interrupt
PieCtrlRegs.PIEACK.all = PIEACK_GROUP1;
}
// INT 3.1
void EPWM1_INT_ISR(void) // EPWM-1
{
GpioDataRegs.GPASET.bit.GPIO27 = 1;//
TEST1();
GpioDataRegs.GPACLEAR.bit.GPIO27 = 1;//
// Clear INT flag for this timer
EPwm1Regs.ETCLR.bit.INT = 1;
// To receive more interrupts from this PIE group, acknowledge this interrupt
PieCtrlRegs.PIEACK.all = PIEACK_GROUP3;
}
ping zhou4:
回复 user1787896:
您上面的问题解决了吗?我也遇到了这样很奇怪的问题,低优先级中断打断高优先级中断,很奇怪,暂时还没有发现原因啊