diff --git a/examples/Charger/Charger.ino b/examples/Charger/Charger.ino index f808ca4..8359abb 100644 --- a/examples/Charger/Charger.ino +++ b/examples/Charger/Charger.ino @@ -30,6 +30,7 @@ Cristian Dragomir (c.dragomir@arduino.cc) Sebastian Romero (s.romero@arduino.cc) */ + #include "Arduino_PowerManagement.h" Charger charger; diff --git a/examples/Standby_WakeFromPin/Standby_WakeFromPin.ino b/examples/Standby_WakeFromPin/Standby_WakeFromPin.ino index c452be7..2603ce1 100644 --- a/examples/Standby_WakeFromPin/Standby_WakeFromPin.ino +++ b/examples/Standby_WakeFromPin/Standby_WakeFromPin.ino @@ -1,24 +1,27 @@ /* Standby Wake From Pin Demo + This sketch demonstrates how you can use the Arduino_PowermManagement library to send a board to standby mode by using a GPIO pin and wake it up from another. This sketch is universal and worksn on both Portenta C33 and H7. + On the the Portenta C33 you can select any of the supported pins (A0, A1, A2, A3, A4, A5, D4, D7) to wake up the board from standby mode, - but on the Portenta H7 only GPIO0 can be used to wake up the board from standby mode. GPIO0 is available through the High Density Connectors and you need a breakout board to access it. + but on the Portenta H7 only GPIO0 can be used to wake up the board from standby mode. GPIO0 is available trough the High Density Connectors and you need a breakout board to access it. Requirements: - - Arduino Portenta C33, Arduino Portenta H7 - - Arduino IDE / Arduino CLI - - PowerManagement library (installable from the Arduino Library Manager) -Usage: - - Connect a button to GOTO_SLEEP_PIN and with a pull-up resistor to 3.3V - - Connect a button to pin PORTENTA_C33_WAKEUP_PIN if you are using the Portenta C33 or GPIO0 if you are using a Portenta H7 and with a pull-up resistor to 3.3V - (If you need information about how to wire the buttons check this link: https://docs.arduino.cc/built-in-examples/digital/Button/) - - Upload the provided sketch to the board - - Press the button connected to GOTO_SLEEP_PIN to put the board into standby mode - - Press the button connected to PORTENTA_C33_WAKEUP_PIN or GPIO0 to wake up the board from standby mode - - The LED will blink every second to show that the board is awake when not in standby mode - - Initial author: Cristian Dragomir (c.dragomir@arduino.cc) + - Arduino Portenta C33, Arduino Portenta H7 + - Arduino IDE / Arduino CLI + - PowerManagement library (installable from the Arduino Library Manager) + + Usage: + - Connect a button to GOTO_SLEEP_PIN and with a pull-up resistor to 3.3V + - Connect a button to pin PORTENTA_C33_WAKEUP_PIN if you are using the Portenta C33 or GPIO0 if you are using a Portenta H7 and with a pull-up resistor to 3.3V + (If you need information about how to wire the buttons check this link: https://docs.arduino.cc/built-in-examples/digital/Button/) + - Upload the provided sketch to the board + - Press the button connected to GOTO_SLEEP_PIN to put the board into standby mode + - Press the button connected to PORTENTA_C33_WAKEUP_PIN or GPIO0 to wake up the board from standby mode + - The LED will blink every second to show that the board is awake when not in standby mode + + Original author: C. Dragomir (http://arduino.cc) */ #include "Arduino.h" diff --git a/examples/Standby_WakeFromRTC_C33/Standby_WakeFromRTC_C33.ino b/examples/Standby_WakeFromRTC_C33/Standby_WakeFromRTC_C33.ino index 33a7d6a..d25ac85 100644 --- a/examples/Standby_WakeFromRTC_C33/Standby_WakeFromRTC_C33.ino +++ b/examples/Standby_WakeFromRTC_C33/Standby_WakeFromRTC_C33.ino @@ -1,11 +1,13 @@ /* Standby Wake from RTC Demo for Portenta C33 + This example demonstrates how to wake up the Portenta C33 from standby mode using the included RTC (Real Time Clock). The device will go to sleep for 1 second and then wake up. When the device is awake you will see the board's blue LED turned on. - Effectively, you will get the same effect as with blink. + Effectivelly, you will get the same effect as with blink. On the Portenta C33 with the peripherals turned off you can expect around 60uA of current consumption in standby mode. The example also turns off the peripherals before going to sleep and turns them back on after waking up. + Usage: - Make sure you are running the latest version of the Renesas Core - Select the Portenta C33 board from the Tools menu @@ -45,8 +47,8 @@ void setup() { } } + board.setAllPeripheralsPower(true); // TODO: Check if this is necessary - digitalWrite(LEDB, LOW); // Turn on the blue LED to show that the board is still awake RTC.begin(); diff --git a/examples/Standby_WakeFromRTC_H7/Standby_WakeFromRTC_H7.ino b/examples/Standby_WakeFromRTC_H7/Standby_WakeFromRTC_H7.ino index 0555dbe..b912897 100644 --- a/examples/Standby_WakeFromRTC_H7/Standby_WakeFromRTC_H7.ino +++ b/examples/Standby_WakeFromRTC_H7/Standby_WakeFromRTC_H7.ino @@ -58,6 +58,7 @@ void setup() { delay(5000); // keep the board awake for 5 seconds, so we can se it working board.shutDownFuelGauge(); + // The LED should go off when the board goes to sleep board.setAllPeripheralsPower(false);