Skip to content
Snippets Groups Projects
Commit 892268d7 authored by Kévin Roussel's avatar Kévin Roussel
Browse files

Ensure only GIE bit is touched in splx_()

parent 07b17059
No related branches found
No related tags found
No related merge requests found
......@@ -82,7 +82,7 @@ enum lpm_mode lpm_set(enum lpm_mode target)
case LPM_OFF:
/* MCU totally down (LPM4), only RESET or NMI can resume execution */
__bis_status_register(CPUOFF | OSCOFF | SCG0 | SCG1);
/* all blocks off */
/* all blocks off */
break;
default:
printf("ERROR: trying to set an invalid low-power mode!\n");
......
......@@ -170,6 +170,7 @@ splhigh_(void)
void
splx_(int sr)
{
sr &= GIE;
/* If GIE was set, restore it. */
asmv("bis %0, r2" : : "r"(sr));
asmv("nop");
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment