Hello Nordic,
I want to power down (at the lowest power consumption state as possible) all the peripherlas.
Already checked below ticket.
Issues with CONFIG settings not being enabled in NCS V2.6.0
Below ticket also referenced for turn off peripherals required to reduce power for not using ones.
NCS v2.4.0: low power by example
C source code getting device.
#define LED_RED_NODE DT_NODELABEL(red_led_pwm) const struct pwm_dt_spec led_red_pwm = PWM_DT_SPEC_GET(LED_RED_NODE); #define LED_GREEN_NODE DT_NODELABEL(green_led_pwm) const struct pwm_dt_spec led_green_pwm = PWM_DT_SPEC_GET(LED_GREEN_NODE); #define LED_BLUE_NODE DT_NODELABEL(blue_led_pwm) const struct pwm_dt_spec led_blue_pwm = PWM_DT_SPEC_GET(LED_BLUE_NODE); ...
.dts (no overlay file used since it's custom board)
&pwm0 {
status = "okay";
pinctrl-0 = <&pwm0_default>;
pinctrl-names = "default";
};
&pinctrl {
...
pwm0_default: pwm0_default {
group1 {
psels = <NRF_PSEL(PWM_OUT0, 0, 22)>,
<NRF_PSEL(PWM_OUT1, 0, 24)>,
<NRF_PSEL(PWM_OUT2, 0, 23)>;
};
};
};
.build log
In file included from C:/ncs/v2.6.1/zephyr/include/zephyr/toolchain.h:50,
from C:/ncs/v2.6.1/zephyr/include/zephyr/sys/util.h:18,
from C:/ncs/v2.6.1/zephyr/include/zephyr/devicetree.h:26,
from c:\ncs\v2.6.1\zephyr\modules\hal_nordic\nrfx\nrfx_config.h:10,
from C:/ncs/v2.6.1/modules/hal/nordic/nrfx/nrfx.h:37,
from C:/ncs/v2.6.1/modules/hal/nordic/nrfx/drivers/include/nrfx_pwm.h:37,
from C:/ncs/v2.6.1/zephyr/drivers/pwm/pwm_nrfx.c:6:
C:/ncs/v2.6.1/zephyr/include/zephyr/toolchain/gcc.h:87:36: error: static assertion failed: "/soc/pwm@4001c000 defined without sleep state"
87 | #define BUILD_ASSERT(EXPR, MSG...) _Static_assert(EXPR, "" MSG)
| ^~~~~~~~~~~~~~
c:\ncs\v2.6.1\zephyr\soc\arm\nordic_nrf\common\soc_nrf_common.h:235:9: note: in expansion of macro 'BUILD_ASSERT'
235 | BUILD_ASSERT(!IS_ENABLED(CONFIG_PM_DEVICE) || \
| ^~~~~~~~~~~~
C:/ncs/v2.6.1/zephyr/drivers/pwm/pwm_nrfx.c:344:9: note: in expansion of macro 'NRF_DT_CHECK_NODE_HAS_PINCTRL_SLEEP'
344 | NRF_DT_CHECK_NODE_HAS_PINCTRL_SLEEP(PWM(idx)); \
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
C:/ncs/v2.6.1/zephyr/drivers/pwm/pwm_nrfx.c:380:1: note: in expansion of macro 'PWM_NRFX_DEVICE'
380 | PWM_NRFX_DEVICE(0);
| ^~~~~~~~~~~~~~~
The whole system works perfectly and the issue arise when I add below CONFIG in _defconfig.
# CONFIG_PM=y CONFIG_POWEROFF=y CONFIG_PM_DEVICE=y CONFIG_PM_DEVICE_RUNTIME=y
Any suggestions?