LPC213x and LPC214x Idle Mode and External Interrupts

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

LPC213x and LPC214x Idle Mode and External Interrupts

Jump to solution
1,327 Views
sutton
Contributor III

I have been using the LPC213x and 214x for several projects over the years.  On each of these projects, I use power down mode in order to save power and to wake up from an external interrupt.  On a new project, I wanted a UART1 interrupt and an external event to wake up the processor.  Since UART1 is needed, I decided to use Idle Mode.  However, I noticed that I am unable to get my external interrupt to wake up on an event.  Does Idle Mode not work with External Interrupts?  I haven't found specific documentation on that.  However, if I go to PD instead, my external interrupt works, so I'm guessing it doesn't work in Idle Mode.  If I simulate a external wakeup event and then wake up from a UART1 event, the external interrupt flag is set, but the wakeup from it doesn't occur.  Can someone verify if Idle Mode can work with External Interrupts or not, so I can continue investigating or change my design.  Thanks in advance.

Also, I don't need an actual interrupt vector.  I just need Idle Mode to resume to code.  Maybe it can't.

Sutton

Labels (1)
1 Solution
1,178 Views
sutton
Contributor III

OK.  Here is the answer. 

For External Interrupts to wake up the processor from Idle Mode, you MUST have a properly set up ISR associated with EINTx.  The ISR is first serviced, then your code will resume execution.  Even if your ISR does nothing (except acknowledge the interrupt), it must be there and activated. 

On Power-Down, an External Interrupt will resume the code execution without any ISRs, if activated properly.

View solution in original post

6 Replies
1,178 Views
soledad
NXP Employee
NXP Employee

Hi, 

According to the reference manual, Peripheral functions continue operation during Idle mode and may generate interrupts to cause the processor to resume execution. 

So it is possible to generate external interrupts in Idle mode. 

Regards 

Soledad

0 Kudos
1,178 Views
sutton
Contributor III

I think the interrupts the manual is talking about is from internal

interrupts from peripherals and not the external interrupt pin. I have

been unable to ever get a wake up from Idle Mode from an External

Interrupt, but it works 100% in Power Down Mode.

Sutton Mehaffey

Lookout Portable Security

4105 Royal Dr. #100

Kennesaw, GA 30144

770-514-7999

770-514-1285 (FAX)

www.lookoutportablesecurity.com

sutton@lookoutportablesecurity.com

0 Kudos
1,178 Views
soledad
NXP Employee
NXP Employee

Hi, 

EINT0 may be used to wake up the processor from Idle or Power-down modes.

pastedImage_1.png

Regards 

Soledad

0 Kudos
1,178 Views
sutton
Contributor III

And then, in the External interrupt section, it only says Power-Down Mode.

4.5 External interrupt inputs

The LPC213x includes four External Interrupt Inputs as selectable pin functions. The External Interrupt Inputs can optionally be used to wake up the processor from Power-down mode.

4.5.1 Register description

The external interrupt function has four registers associated with it. The EXTINT register contains the interrupt flags, and the EXTWAKEUP register contains bits that enable individual external interrupts to wake up the microcontroller from Power-down mode.

0 Kudos
1,179 Views
sutton
Contributor III

OK.  Here is the answer. 

For External Interrupts to wake up the processor from Idle Mode, you MUST have a properly set up ISR associated with EINTx.  The ISR is first serviced, then your code will resume execution.  Even if your ISR does nothing (except acknowledge the interrupt), it must be there and activated. 

On Power-Down, an External Interrupt will resume the code execution without any ISRs, if activated properly.

1,178 Views
sutton
Contributor III

Thanks.  I did read that.  But, so far I still have been unsuccessful getting ENT3 to wake up the processor from Idle Mode.  ENT3 wakes it up every time on Power Down mode every time.

0 Kudos