[riot-notifications] [RIOT-OS/RIOT] cpu/sam0: add support for SAMD5x/SAME5x (#11305)

benpicco notifications at github.com
Wed Apr 17 18:27:22 CEST 2019


benpicco commented on this pull request.



> +                DEBUG("pm_set(): setting IDLE1 mode.\n");
+                _mode = PM_SLEEPCFG_SLEEPMODE_IDLE1;
+                break;
+            case 3:
+                DEBUG("pm_set(): setting IDLE0 mode.\n");
+                _mode = PM_SLEEPCFG_SLEEPMODE_IDLE0;
+                break;
+        }
+
+        /* write sleep configuration */
+        PM->SLEEPCFG.bit.SLEEPMODE = _mode;
+        /* make sure value has been set */
+        while (PM->SLEEPCFG.bit.SLEEPMODE != _mode) {}
+    }
+
+    cortexm_sleep(mode);

Ok, so BACKUP only works if Vbat is connected (but allows to retain some RAM) whereas HIBERNATE  always works, so I'm switching to that by default.

-- 
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
https://github.com/RIOT-OS/RIOT/pull/11305#discussion_r276328558
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.riot-os.org/pipermail/notifications/attachments/20190417/7bb64340/attachment.html>


More information about the notifications mailing list