I was looking for a different reference and I tripped over this note (SLAU367K sec. 12.3.1): ---- Note, the same I/O initialization procedure can be used for all reset cases and wake-up from LPMx.5 - except for PxIFG: 1. Initialize Ports: PxDIR, PxREN, PxOUT, and PxIES 2. Clear LOCKLPM5 3. If not wake-up from LPMx.5: clear all PxIFGs to avoid erroneous port interrupts... ----- I hadn't noticed this before, and I don't know why it's done this way. (Since old habits are hard to break, I always clear LOCKLPM5 before doing anything, so I never bumped into it.) -> Suggestion: Try moving the '"P1IFG=0;P1IE |= BIT6;" to follow, rather than precede, the clearing of LOCKLPM5.
↧