TI中文支持网
TI专业的中文技术问题搜集分享网站

C6455手动产生中断问题,

ISTP = 0x00800000;
IER|=0x00000603;//enable interrupt: reset, NMI,INT9
CSR    |=    0x1;    //enable interruput
INT_MUX(INT9,RINT1);
EVTSET = 0x800;
EVTCLR = 0X800;

为什么我这样不能进入中断服务程序,这个是使用Event Combiner

Event Mask Registers都是全零,没有被屏蔽。

Shine:

EVTSET = 0x800;EVTCLR = 0X800;

这里为什么设了flag又马上清0?

autstyh autstyh:

回复 Shine:

我是看到EVTSET = 0x800产生不了效果,就写了下面那句,去掉的话也产生不了中断

Shine:

回复 autstyh autstyh:

RINT1对应的的事件号是42, EVTSET1应设成0x400.

autstyh autstyh:

回复 Shine:

嗯,我改了,但是也不行,不知道为啥

Shine:

回复 autstyh autstyh:

IFR寄存器相应位也置1了么?

autstyh autstyh:

回复 Shine:

你好,IFR寄存器没变,这到底是哪条路没通啊?求指教

Shine:

回复 autstyh autstyh:

"IFR寄存器没变"是什么意思?IFR相应位也手动置1了吗?

autstyh autstyh:

回复 Shine:

额,这个寄存器能手动设置???这个不是只读的吗?,我写了IFR = 0X200;(INT9),显示错误信息:

"C:\DOCUME~1\ADMINI~1\LOCALS~1\Temp\0533210", ERROR!   at line 300: [E0004]         IFR illegal as destination register               MVC     .S2     B4,IFR            ; |18|

Shine:

回复 autstyh autstyh:

通过ISR寄存器将IFR置1

autstyh autstyh:

回复 Shine:

你好,谢谢你的回答,这样是可以产生中断,但不是我想要的那种,

SPRU871K中The 128 system events are either event inputs or event combinations generated by the event combiner,我想要的是通过event combiner来产生的中断,下图中的上面通道,如果你直接设置ISR,就不知道是上面那条路还是下面那条路产生的中断。

赞(0)
未经允许不得转载:TI中文支持网 » C6455手动产生中断问题,
分享到: 更多 (0)