soc: st: warn if running with debug on sleep enabled
Add a compiler warning when building for an STM32 series MCU with PM enabled but STM32_ENABLE_DEBUG_SLEEP_STOP=y. That option greatly increases the power consumption during sleep, which is probably undesirable when building with PM=y, and it can be activated silently as a side effect of other options (namely RTT) making it tricky to find out. Add a warning to expose the situation. Signed-off-by: Fabio Baltieri <fabiobaltieri@google.com>
This commit is contained in:
parent
7962dcb288
commit
b33b3b17f7
1 changed files with 9 additions and 0 deletions
|
@ -16,6 +16,15 @@
|
|||
#include <stm32_ll_bus.h>
|
||||
#include <stm32_ll_pwr.h>
|
||||
|
||||
#if CONFIG_PM
|
||||
|
||||
#if !defined(CONFIG_DEBUG) && defined(CONFIG_STM32_ENABLE_DEBUG_SLEEP_STOP)
|
||||
#warning "Running with PM=y and STM32_ENABLE_DEBUG_SLEEP_STOP=y, \
|
||||
this will result in increased power consumption during sleep."
|
||||
#endif
|
||||
|
||||
#endif /* CONFIG_PM */
|
||||
|
||||
/**
|
||||
* @brief Perform SoC configuration at boot.
|
||||
*
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue