Hi everyone,
i'm writing to ask some advice for my NBIOT AWS application with the nRF9160 DK.
- I'm currently using the aws_iot sample available as a baseline for my project, but i noticed that power consumption are really high using the sample application as it is, also enabling CONFIG_PM=y in prj.conf. Since UART in this example is largely used for debug purposes, is it better to start from a clean AT client sample application to achieve the best possible power performance adding one by one all that i need? Do i have take care of something else?
- I red a lot about Power Manager of Zephyr, but i didn't understand how to use it in my application (Zephyr version should be 2.7.99 as printed in LTE Link Monitor while running). I'm doing this steps for simplification:
- Add CONFIG_PM=y at top of prj.conf
- Include #include <pm/device.h>
- Initiate a task that calls the following function found on another ticket and modified to match my version as described here.
static void disable_uart0_fn(struct k_work *work) { // Turn off logging (which is using UART0): console = device_get_binding(DT_LABEL(DT_CHOSEN(zephyr_console))); pm_device_state_set(console, PM_DEVICE_STATE_OFF); }
The result is that i'm not able to build the application because "pm_device_state_set is __deprecated" . Is there any guide to follow that could help me?
Thanks in advance.
Salvo