Quantcast
Channel: C2000™︎ 微控制器论坛 - 最近的话题
Viewing all articles
Browse latest Browse all 12242

dsp2808外部io中断可以配置成查询模式吗

$
0
0

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


Viewing all articles
Browse latest Browse all 12242

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>