I can't exit PM3 via an external interrupt (triggered by pushing a button on PO_1). The external interrupt works fine if the processor is in PM0. Problem still occurs in PM2 and PM1. Here's the code I'm using for reference:
// code to trigger external interrupt when S1 is pressed. P0DIR = 0; P0IFG = 0x00; // clear interrupt flag PICTL |= 0x08; // enable interrupt on P0_0 to P0_3 P0IFG = 0x00; // clear interrupt flag IEN1 |= 0x20; // enable PO interrupt EA = 1; // global interrupt enable SLEEP |= 0x03; // Setup processor to enter PM3 PCON |= 0x01; // Enter PM3
Any help would be appreciated!
If the chip is a CC1110 or CC2510, check DN106 on the TI website. Also there is a new release of software examples for these chips. If it is neither of these, please let us know what you are using for a transceiver chip.
I'm using the CC2430. I'm able to wake up from PM1 via an external interrupt but not PM2 or PM3. I'll look over the doc that you mentioned to see if it has any info that could help.
Make sure that your input is configured correctly with respect to
input mode etc.
Also remember to clear the CPU interrupt flag related to Port 0,
not only the module flag.
Remember that for port interrupts the module interrupt flag should
be cleared prior to clearing the CPU interrupt flag.
I'm using TIMAC and CC2430 as well.
I have tried now to go to sleep in PM3 and thanks to your code now i can wake up just pressing S1. Or setting P0_0 to P0_3 to ground.
So I don't know what could be your problem.
EDIT: It worked well with PM3, but with PM2 it only wakes up when P0_1 is set to ground, any idea of the problem?
All content and materials on this site are provided "as is". TI and its respective suppliers and providers of content make no representations about the suitability of these materials for any purpose and disclaim all warranties and conditions with regard to these materials, including but not limited to all implied warranties and conditions of merchantability, fitness for a particular purpose, title and non-infringement of any third party intellectual property right. TI and its respective suppliers and providers of content make no representations about the suitability of these materials for any purpose and disclaim all warranties and conditions with respect to these materials. No license, either express or implied, by estoppel or otherwise, is granted by TI. Use of the information on this site may require a license from a third party, or a license from TI.
TI is a global semiconductor design and manufacturing company. Innovate with 100,000+ analog ICs andembedded processors, along with software, tools and the industry’s largest sales/support staff.