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.
Hi,
I use the example code :ctpl_ex1_gpio_lpm45_msp-exp430fr6989 to pratice on FR6989. I found that the GIE did't set ,but the external gpio port intterrupt still wakeup from LPM4.5, how does it works? Down below is the code.
/****************************************************/
WDTCTL = WDTPW | WDTHOLD; /* Initialize GPIO and clocks */ initGpio(); initClocks(); P9OUT &= ~BIT7; ctpl_enterLpm45(CTPL_DISABLE_RESTORE_ON_RESET); P9OUT |= BIT7; while (1) { P9OUT ^= BIT4; __delay_cycles(100000); }
/****************************************************/
In the code ,I did't found a code line to enable the global interrupt.
Second question,I use IAR to download the code example then run. STOP it then run ,IAR mention that the cpu is off and intterrupts are disabled.I quit the bebug mode. I need to reset the tagart ,then the external gpio intterrupt can wakeup from LPM4.5,why need reset?
Hello,
LPMx.5 modes switch off the core LDO for the lowest power consumption available on a MSP430 device, as a result wake-up from LPMx.5 causes a complete reset of the core and the application must completely re-initialize the device. You will therefore know if a GPIO eventis triggered not through an ISR but through a reset of the device. The handler inside of the ctpl_enterLpm45 function determines whether the CTPL utility restores a saved state if the device is reset or powered on from a cold start. You can read more about CTPL functionality in the FRAM Utilities User's Guide: dev.ti.com/.../FRAM-Utilities-UsersGuide.pdf
I'm not sure about IAR, but in CCS it is possible to debug in LPMx.5 mode. Please refer to section F.4 of the CCS v6.1 User's Guide (SLAU157):
Regards,
Ryan
**Attention** This is a public forum