dsp2808外部io中断可以配置成查询模式吗?我不想进入中断服务程序里执行, 请问怎么配置呢,有什么寄存器呢,
我看了手册,没找到相应的程序,网上也没有查到相关
代码这里 我把几句代码注释了 还是进去中断。
// Interrupts that are used in this example are re-mapped to
// ISR functions found within this file.
EALLOW; // This is needed to write to EALLOW protected registers
// PieVectTable.XINT4 = &Sync0_ISR;
EDIS; // This is needed to disable write to EALLOW protected registers
// Enable Xint1 and XINT2 in the PIE: Group 1 interrupt 4 & 5
// Enable int1 which is connected to WAKEINT:
PieCtrlRegs.PIECTRL.bit.ENPIE = 1; // Enable the PIE block
PieCtrlRegs.PIEIER12.bit.INTx2 = 1; // Enable PIE Gropu 12 INT2
IER |= M_INT12; // Enable CPU int1
EINT; // Enable Global Interrupts
// GPIO0 and GPIO1 are inputs
EALLOW;
GpioCtrlRegs.GPBMUX2.bit.GPIO61 = 0; // GPIO
GpioCtrlRegs.GPBDIR.bit.GPIO61 = 0; // input
GpioCtrlRegs.GPBQSEL2.bit.GPIO61 = 0; // XINT2 Qual using 6 samples
EDIS;
EALLOW;
GpioIntRegs.GPIOXINT4SEL.bit.GPIOSEL = 0x1d; //
EDIS;
// Configure XINT1
XIntruptRegs.XINT4CR.bit.POLARITY = 0; // Falling edge interrupt
// Enable XINT1 and XINT2
// XIntruptRegs.XINT4CR.bit.ENABLE = 1; // 使能外部中断4
Eric Ma:
把IER|=M_INT12;取消,这个第12组的中断就都被禁止给CPU。
然后你查询PIEFLG 可以查这个标志位。
ERIC