spectraphilic / wsn_riot

RIOT OS for WSN application at UiO
0 stars 0 forks source link

periph_pm (Power management) #7

Open jdavid opened 3 years ago

jdavid commented 3 years ago

Power saving is not yet implemented on ATmega:

$ BOARD=waspmote-pro FFLAGS_EXTRA="-F" make -C tests/periph_pm all flash
[...]
$ BOARD=waspmote-pro BOOTLOADER_BAUD=115200 make -C tests/periph_pm term
[....]
2020-10-05 17:57:23,373 # main(): This is RIOT! (Version: 2021.01-devel-10-ge1418)
2020-10-05 17:57:23,437 # This application allows you to test the CPU power management.
2020-10-05 17:57:23,501 # Layered support is not unavailable for this CPU. Reset the CPU if
2020-10-05 17:57:23,517 # needed.
[...]
2020-10-05 17:58:44,075 #  pm
2020-10-05 17:58:44,076 # Usage:
2020-10-05 17:58:44,092 #   pm off: call pm_off()

It is implemented in remote-revb:

$ BOARD=remote-revb make -C tests/periph_pm all flash term
[...]
> pm
2020-10-05 18:04:48,603 #  pm
2020-10-05 18:04:48,603 # Usage:
2020-10-05 18:04:48,604 #   pm show: display current blockers for each power mode
2020-10-05 18:04:48,606 #   pm set <mode>: manually set power mode (lasts until WFI returns)
2020-10-05 18:04:48,607 #   pm block <mode>: manually block power mode
2020-10-05 18:04:48,607 #   pm unblock <mode>: manually unblock power mode
2020-10-05 18:04:48,608 #   pm off: call pm_off()
> pm show
2020-10-05 18:04:56,840 #  pm show
2020-10-05 18:04:56,842 # mode 0 blockers: 1 
2020-10-05 18:04:56,843 # mode 1 blockers: 1 
2020-10-05 18:04:56,844 # mode 2 blockers: 1 
2020-10-05 18:04:56,845 # mode 3 blockers: 1 
2020-10-05 18:04:56,846 # Lowest allowed mode: 4
> pm set 3
2020-10-05 18:05:17,557 #  pm set 3
2020-10-05 18:05:17,559 # CPU is entering power mode 3.
2020-10-05 18:05:19,548 # Now waiting for a wakeup event...

Don't know about feather-m0

Related links: