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.

F28035外部中断不响应

Other Parts Discussed in Thread: CONTROLSUITE

将GPIO10配置为外部中断口,程序可以正常响应外部中断,但是改为GPIO20作为外部中断口之后程序不能响应外部中断了,请问这是什么原因?好像只有GPIO0-10配置为外部中断口时程序可以正常响应外部中断。部分代码如下:

EALLOW; // This is needed to write to EALLOW protected registers
PieVectTable.XINT1 = &xint1_isr;
EDIS;

PieCtrlRegs.PIECTRL.bit.ENPIE = 1; // Enable the PIE block
PieCtrlRegs.PIEIER1.bit.INTx4 = 1; // Enable PIE Gropu 1 INT4
IER |= M_INT1; // Enable CPU INT1
EINT;

EALLOW;
GpioCtrlRegs.GPAMUX2.bit.GPIO20 = 0; // GPIO
GpioCtrlRegs.GPADIR.bit.GPIO20 = 0; // input
GpioCtrlRegs.GPAQSEL2.bit.GPIO0 = 0; // XINT1 Synch to SYSCLKOUT only

EDIS;

EALLOW;
GpioIntRegs.GPIOXINT1SEL.bit.GPIOSEL = 20; // XINT1 is GPIO20
EDIS;

XIntruptRegs.XINT1CR.bit.POLARITY = 0; // Falling edge interrupt