[riot-notifications] [RIOT-OS/RIOT] cpu: lpc1768: provide periph_pm (#8861)

Kaspar Schleiser notifications at github.com
Wed Apr 4 10:49:58 CEST 2018


kaspar030 commented on this pull request.



> +#include "periph/pm.h"
+
+void pm_set(unsigned mode)
+{
+    switch (mode) {
+        case 0:
+            /* enter power down mode */
+            LPC_SC->PCON = 0x01;
+            cortexm_sleep(1);
+            break;
+        case 1:
+            /* enter deep sleep mode */
+            LPC_SC->PCON = 0x00;
+            cortexm_sleep(1);
+            break;
+        case 2:

OK!

It's just that the mode ```PM_NUM_MODES``` sets the CPU to idle on the other cortex-m. So I was wondering if ```LPC_SC->PCON = 0x00;``` means "no power management other than CPU idle", in which case I suggest setting ```PM_NUM_MODES=2```.

-- 
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/8861#discussion_r179067284
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.riot-os.org/pipermail/notifications/attachments/20180404/42a96f3c/attachment.html>


More information about the notifications mailing list