mirror of
https://github.com/oliverschmidt/contiki.git
synced 2024-09-06 04:54:38 +00:00
cc2538: lpm: Fix energest context when aborting lpm_enter()
In one of the abort cases in lpm_enter(), the energest context has previously been set to LPM, so the abort code needs to set it back to CPU. Signed-off-by: Benoît Thébaudeau <benoit.thebaudeau@advansee.com>
This commit is contained in:
parent
f2c552bb55
commit
8514a91ea9
@ -301,6 +301,11 @@ lpm_enter()
|
|||||||
select_32_mhz_xosc();
|
select_32_mhz_xosc();
|
||||||
|
|
||||||
REG(SYS_CTRL_PMCTL) = SYS_CTRL_PMCTL_PM0;
|
REG(SYS_CTRL_PMCTL) = SYS_CTRL_PMCTL_PM0;
|
||||||
|
|
||||||
|
/* Remember IRQ energest for next pass */
|
||||||
|
ENERGEST_IRQ_SAVE(irq_energest);
|
||||||
|
ENERGEST_ON(ENERGEST_TYPE_CPU);
|
||||||
|
ENERGEST_OFF(ENERGEST_TYPE_LPM);
|
||||||
} else {
|
} else {
|
||||||
/* All clear. Assert WFI and drop to PM1/2. This is now un-interruptible */
|
/* All clear. Assert WFI and drop to PM1/2. This is now un-interruptible */
|
||||||
assert_wfi();
|
assert_wfi();
|
||||||
|
Loading…
Reference in New Issue
Block a user