LPC1343 interrupt not disabling

取消
显示结果 
显示  仅  | 搜索替代 
您的意思是: 

LPC1343 interrupt not disabling

1,276 次查看
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by caiomarcos on Mon Jul 15 20:44:24 MST 2013
I'm using pin 2.9 as an edge, low, interrupt input.
In one function I have to disable it, but that doesn't seem to be working. Even after using GPIOIntDisable( 2, 9); my code still calls the handler when the pin goes low.

The relevant parts:

void PIOINT2_IRQHandler (void)
{
RF_interrupt_handler( );
GPIOIntClear( 2, 9 );//clear interrupt
}

int main(void)
{
GPIOInit( );
GPIOSetDir( 2, 9, 0 );
GPIOSetInterrupt( 2, 9, 0, 0, 0 ); 
GPIOIntEnable( 2, 9 );

...


Then somewhere else I call a function and in the beggining of it goes GPIOIntDisable( 2, 9); and in the end GPIOIntEnable( 2, 9);
Putting a break point in the RF_handler line stops the debugger when the interrupt is supposedly disabled. What am I missing?
标签 (1)
0 项奖励
回复
2 回复数

1,241 次查看
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by caiomarcos on Wed Jul 17 11:44:17 MST 2013
Just tried that, and no success.
0 项奖励
回复

1,241 次查看
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by serge on Tue Jul 16 03:49:00 MST 2013
Ever tried clearing the int just before disabling it?

HTH
0 项奖励
回复