LPC11UXX External active level interrupt

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

LPC11UXX External active level interrupt

429 次查看
Andy2022
Contributor II

Dears,

I encountered a issue about active-level interrupt when I use #LPC11U35BFD# mcu. I use the command to control Ex-Interrupt mode and trigger 

The similar init code, the edge(rasing or falling) interrupt and level interrupt work well, but the active-level(High or Low) interrupt doesn't work.

I use the command to switch the interrupt mode(Rasing, Falling, High-Level, Low-Level).

NVIC_DisableIRQ(FLEX_INT0_IRQn);
LPC_GPIO_PIN_INT->ISEL  |= (1UL << 0); //Level sentisive
LPC_GPIO_PIN_INT->CIENR |=  (1UL << 0);  //close level interrupt
//Those two configurations only execute one.
LPC_GPIO_PIN_INT->IENF |=  (1UL << 0);       //enable High Level Interrupt
LPC_GPIO_PIN_INT->IENF &=  ~(1UL << 0);   //enable Low Level Interrupt
 
LPC_IOCON->PIO0_2      |= 0x10;
LPC_GPIO_PIN_INT->RISE |= (1UL << 0);
LPC_GPIO_PIN_INT->FALL |= (1UL << 0);
LPC_GPIO_PIN_INT->IST  |= (1UL << 0);
NVIC_EnableIRQ(FLEX_INT0_IRQn);
 
If  you have any suggestions, please tell me, thanks.

 

标签 (1)
标记 (2)
0 项奖励
回复
5 回复数

418 次查看
Alice_Yang
NXP TechSupport
NXP TechSupport

Hello @Andy2022 

Thanks for your question.

"level interrupt work well, but the active-level(High or Low) interrupt doesn't work."

->> Sorry so does level interrupt work or not?

And if it doesn't work, I recommend you refer to the pinint demo under LPCopen, firstly clear the status , then  configure interrupt.

/* Configure channel interrupt as edge sensitive and falling edge interrupt */

Chip_PININT_ClearIntStatus(LPC_PININT, PININTCH(GPIO_PININT_INDEX));

Chip_PININT_SetPinModeEdge(LPC_PININT, PININTCH(GPIO_PININT_INDEX));

Chip_PININT_EnableIntLow(LPC_PININT, PININTCH(GPIO_PININT_INDEX));

Thank you.

 

BR

ALice

0 项奖励
回复

410 次查看
Andy2022
Contributor II

Hi Alice_Yang:

Thanks for your reply.
The Level interrupt works well (High->Low and Low -> High both trigger an interrupt ).

Andy2022_0-1753284367967.png

However, I only set High-Level interrupt or Low-Level interrupt, the corresponding operation can't trigger an interrupt.

Andy2022_3-1753284608790.png

Andy2022_2-1753284512662.png

 

Thanks very much.

 

BR,

Andy2022

0 项奖励
回复

379 次查看
Alice_Yang
NXP TechSupport
NXP TechSupport

Hello @Andy2022 

How about using the three APIs above?

Also, please measure the input signal to confirm that it is high when a high-active interrupt is set.

 

BR

Alice

0 项奖励
回复

377 次查看
Andy2022
Contributor II
Hi Alice:
Sorry, I haven't used three APIs yet. Because I used Keil.LPC1100_DFP.1.4.1.pack and keil environment(No Keil IDE) to compile code, so I couldn't use three APIs directly. Could you provide those APIs' source code?
And, I observed the Level through Logical analyzer, so I was sure that it is high when a high-active interrupt is set.

Thanks.

BR,
Andy
0 项奖励
回复

228 次查看
Alice_Yang
NXP TechSupport
NXP TechSupport

Hello @Andy2022 

Please download LPCopen, where you can find the three APIs.

https://www.nxp.com/design/design-center/software/software-library/lpcopen-software-development-plat...  

Additionally, there is a GPIO interrupt demo available for your reference.

Thank you.

 

BR

Alice

0 项奖励
回复