Skip to content
Permalink
Browse files

MSP430X added attribute in ISR to exit from LPM. Usable only for ISR1…

… by now
  • Loading branch information
jlbirccyn committed Dec 13, 2019
1 parent aa60a7b commit 704768fe4da21c9dfd5c37fc8555ccaa411676ec
@@ -66,5 +66,6 @@ CPU readbutton {
SOURCE = PORT4_VECTOR {
BIT = 5;
}; /* Button S1 is on GPIO port 4, bit 5 */
EXIT_FROM_LPM = TRUE;
};
};
@@ -72,7 +72,23 @@ end if %
* -3- Pop volatile registers
*/
tpl_direct_irq_handler_exit_% !handlerSource %:
popm.w #5, r15
popm.w #5, r15%
if [obj type] == @struct then
if obj::EXIT_FROM_LPM then %
/*-----------------------------------------------------------------------------
* -3b- exit from LPM if required
*/
bic #0xF0, 0(SP)%
end if
else
if obj[0]::EXIT_FROM_LPM then %
/*-----------------------------------------------------------------------------
* -3b- exit from LPM if required
*/
bic #0xF0, 0(SP)%
end if
end if
%
/*-----------------------------------------------------------------------------
* -4- Return.
*/
@@ -17,6 +17,7 @@ IMPLEMENTATION msp430x {
/* Add to ISR objects target interrupt sources */
ISR [] {
#include <interruptSources.oil>
BOOLEAN EXIT_FROM_LPM = FALSE;
};

/* Boundaries addresses for the MPU */

0 comments on commit 704768f

Please sign in to comment.
You can’t perform that action at this time.