cpu/saml1x: pm: set deep flag
STANDBY mode is considered Deep Sleep on all other sam0 platforms. Set it here too to be consistent.
This commit is contained in:
parent
e7bf1ef706
commit
e1ca9102d5
@ -26,12 +26,14 @@
|
|||||||
|
|
||||||
void pm_set(unsigned mode)
|
void pm_set(unsigned mode)
|
||||||
{
|
{
|
||||||
|
int deep = 0;
|
||||||
uint32_t _mode;
|
uint32_t _mode;
|
||||||
|
|
||||||
switch (mode) {
|
switch (mode) {
|
||||||
case 0:
|
case 0:
|
||||||
DEBUG_PUTS("pm_set(): setting STANDBY mode.");
|
DEBUG_PUTS("pm_set(): setting STANDBY mode.");
|
||||||
_mode = PM_SLEEPCFG_SLEEPMODE_STANDBY;
|
_mode = PM_SLEEPCFG_SLEEPMODE_STANDBY;
|
||||||
|
deep = 1;
|
||||||
break;
|
break;
|
||||||
default: /* Falls through */
|
default: /* Falls through */
|
||||||
case 1:
|
case 1:
|
||||||
@ -45,5 +47,5 @@ void pm_set(unsigned mode)
|
|||||||
/* make sure value has been set */
|
/* make sure value has been set */
|
||||||
while (PM->SLEEPCFG.bit.SLEEPMODE != _mode) {}
|
while (PM->SLEEPCFG.bit.SLEEPMODE != _mode) {}
|
||||||
|
|
||||||
sam0_cortexm_sleep(0);
|
sam0_cortexm_sleep(deep);
|
||||||
}
|
}
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user