To save energy, we are investigating how RTC controls Deep Sleep (or Cold Sleep).
With Arduino IDE, you can boot (boot) from Deep Sleep (or Cold Sleep) using RTC by using the LowPower Library API, but SDK does not seem to implement up_pm_sleep with timer control.
If there is a way to control Sleep using the RTC timer in SDK environment, could you please let me know?
(It would be nice if I could bring the LowPowerClass of Arduio IDE into the SDK side...)
spresense arduino
As far as Arduino's source code is concerned, it seems that you are only sleeping after setting the RTC alarm.I tried the SDK to mimic it, and it turned out to be the same thing (of coursebut)
Verified operation using the SDK NutShell command using the following methods:
Enable and Build Alarm Samples:
$./tools/config.py examples/alarm
$ make
On NutShell, if you set the alarm timer for 10 seconds with the alarm
command and then Deep Sleep with the poweroff
command, it wakes up and restarts after 10 seconds.
nsh>alarm10
alarm_daemon started
alarm_daemon —Running
Opening/dev/rtc0
Alarm 0 set in 10 seconds
nsh>poweroff
NuttShell (NSH) NuttX - 7.22
nsh>
Cold Sleep was also launched after 10 seconds.
nsh>alarm10
nsh>poweroff -- cold
I simply checked the command base (this is super useful),
I think the combination of the examples/alarm source and board_power_off() function can be realized.
That's all for your reference.
618 Uncaught (inpromise) Error on Electron: An object could not be cloned
916 When building Fast API+Uvicorn environment with PyInstaller, console=False results in an error
613 GDB gets version error when attempting to debug with the Presense SDK (IDE)
573 rails db:create error: Could not find mysql2-0.5.4 in any of the sources
© 2024 OneMinuteCode. All rights reserved.