Weird QEI interrupt behavior on LPC1751

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

Weird QEI interrupt behavior on LPC1751

748 次查看
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by luoldeng on Mon Jan 27 14:10:06 MST 2014
I am enabling only 2 specific interrupts (index pulse, encoder clock pulse) in QEIIES, but when the IRQ handler gets called and I check QEIINTSTAT, there are other interrupt flags shown (position compare, for example). Why?
0 项奖励
回复
2 回复数

711 次查看
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by luoldeng on Fri Jan 31 11:03:06 MST 2014
Nevermind, I guess.
0 项奖励
回复

711 次查看
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by luoldeng on Tue Jan 28 23:54:32 MST 2014
In my setup code:
LPC_QEI->QEIIEC |= 0xFFFFFFFF;
LPC_QEI->QEICLR |= 0xFFFFFFFF;
LPC_QEI->QEIIES = 0x00000021;

NVIC_ClearPendingIRQ(QEI_IRQn);
NVIC_EnableIRQ(QEI_IRQn);


I'm pausing the debugger when my QEI interrupt handler fires and this is the peripheral memory:

[img]http://electrifiedfoolingmachine.co/dext0rb/qei.jpg[/img]

Is it allowable for QEIINTSTAT to have flags asserted for interrupts that are not enabled?
I would expect QEIINTSTAT to only be either 0x00, 0x01, 0x20, 0x21 in this situation. 


0 项奖励
回复