This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

Can't exit PM3 via external interrupt

Other Parts Discussed in Thread: CC2510, CC2430, TIMAC

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.

    Ron

  • 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.

    Thanks!

  • 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?