-
Notifications
You must be signed in to change notification settings - Fork 36
bench_pm: Helper application for testing pm behavior #55
base: master
Are you sure you want to change the base?
Conversation
The application assists in measuring wake up delays and for measuring power consumption of different low power modes.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Minor comments, look good to me - untested ACK
addressed comments |
Updated:
|
#endif | ||
|
||
#if COMA_MODE | ||
puts("Coma mode, going to pm_set(0), not coming back"); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I've had some boards that made it really difficult to re-attach a debugger when going to deep sleep too fast.
Could we maybe guard this, either by a second delay or using something like while (gpio_read(BUTTON1)) {}
?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
some boards that made it really difficult to re-attach a debugger
Like, the only way was to do "while true; do make -C examples/hello-world flash; done" and hammering the reset button, hoping to hop into the short time from reset to CPU stop...
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
And reset_config connect_assert_srst and a recent openocd did not help?
(including the important improvement bb976e3c387bc82e20ab7304f0cfac3e5eede3a1 in https://repo.or.cz/openocd.git/commit/bb976e3c387bc82e20ab7304f0cfac3e5eede3a1 if you are using a CMSIS-DAP debugger)
The application assists in measuring wake up delays and for measuring power consumption of different low power modes. A logic analyzer or oscilloscope is required for taking any measurements.
This application was used to test the GPIO interrupt optimizations in RIOT-OS/RIOT#8558
Works out of the box on any board which defines BTN0_PIN which is used as a wake up trigger.
A special "coma mode" is used when building with
CFLAGS=-DCOMA_MODE
, this will make the application skip initialization of wake up sources and go to the lowest power mode without waking up. This mode is specifically designed to measure the baseline power consumption, to use as a reference when comparing different hardware settings and software changes.