Important changes to repositories hosted on mbed.com
Mbed hosted mercurial repositories are deprecated and are due to be permanently deleted in July 2026.
To keep a copy of this software download the repository Zip archive or clone locally using Mercurial.
It is also possible to export all your personal repositories from the account settings page.
Fork of mBuino_Dice by
Diff: main.cpp
- Revision:
- 5:e2f89a6f4d6c
- Parent:
- 4:0c3a1b829d8c
- Child:
- 6:e52dbebd7465
--- a/main.cpp Wed Sep 10 10:00:23 2014 +0000
+++ b/main.cpp Mon Sep 15 16:35:48 2014 +0000
@@ -51,6 +51,7 @@
Timer tWait; // time used for tickcounts
+DigitalIn progMode(P0_3); // need to disable pull-down for minimal power deep sleep
void myPowerDown(uint8_t uMode=0x02)
{ // Go into power-down mode (0x2) to safe most power. Use onboard or off-board interrupt triggered button to revive
// See https://mbed.org/forum/electronics/topic/5138/
@@ -61,6 +62,9 @@
// Sleep 7mA (3 days)
// Deep-sleep 480uA (43 days)
// Power-down 120uA (170 days)
+ // Power-down with fix 3uA (years)
+ progMode.mode(PullNone); // fix the 120uA. see http://mbed.org/forum/electronics/topic/5138/?page=1#comment-25338
+
LPC_PMU->PCON = uMode; // 0x2 = power down, 0x1 = deep sleep
SCB->SCR |= SCB_SCR_SLEEPDEEP_Msk;
LPC_SYSCON->PDAWAKECFG &= 0xFFFFF800;
