Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

CONFIG_SYS_POWER_MANAGEMENT Makes Build Fail for nRF5340 and nRF9160 #21318

Closed
MarcianoPreciado opened this issue Dec 12, 2019 · 3 comments · Fixed by #21075
Closed

CONFIG_SYS_POWER_MANAGEMENT Makes Build Fail for nRF5340 and nRF9160 #21318

MarcianoPreciado opened this issue Dec 12, 2019 · 3 comments · Fixed by #21075
Assignees
Labels
area: Power Management bug The issue is a bug, or the PR is fixing a bug platform: nRF Nordic nRFx priority: medium Medium impact/importance bug

Comments

@MarcianoPreciado
Copy link

The current implementation of zephyr/subsys/power/device.c breaks because of the following:

#if defined(CONFIG_SYS_POWER_MANAGEMENT)
...
/*
 * FIXME: Remove the conditional inclusion of
 * core_devices array once we enble the capability
 * to build the device list based on devices power
 * and clock domain dependencies.
 */
#if defined(CONFIG_SOC_SERIES_NRF52X) || defined(CONFIG_SOC_SERIES_NRF51X)
#define MAX_PM_DEVICES	15
#define NUM_CORE_DEVICES	4
#define MAX_DEV_NAME_LEN	16
static const char core_devices[NUM_CORE_DEVICES][MAX_DEV_NAME_LEN] = {
	"CLOCK_32K",
	"CLOCK_16M",
	"sys_clock",
	"UART_0",
};
#else
#error "Add SoC's core devices list for PM"
#endif
...
#endif /* defined(CONFIG_SYS_POWER_MANAGEMENT) */

The documentation describes that SYS_POWER_MANAGEMENT is dependent on SOC_FAMILY_NRF which is selected by SOC_SERIES_NRF51X, SOC_SERIES_NRF52X, SOC_SERIES_NRF53X, SOC_SERIES_NRF91X. Both of the soc_series symbols for the nRF53x and nRF91x select HAS_SYS_POWER_STATE_DEEP_SLEEP_1 also which shows that the system power management functionality was intended to be compatible for both series.

I'm currently working on an extreme low-power iot device on the nRF5340 and this feature is necessary to reach the lowest power state without losing significant development time. I'd be happy to help via a pull request, but I am quite new to Zephyr and am not yet familiar enough to start modifying the codebase.

@MarcianoPreciado MarcianoPreciado added the bug The issue is a bug, or the PR is fixing a bug label Dec 12, 2019
@masz-nordic
Copy link
Collaborator

@MarcianoPreciado can you try #21075 and see if it helps?

@MarcianoPreciado
Copy link
Author

@masz-nordic I tried the pull request you mentioned and it seems to help a lot! Do you know exactly what is holding it up from being merged?

@MarcianoPreciado
Copy link
Author

I will close the issue once your pull request is accepted.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area: Power Management bug The issue is a bug, or the PR is fixing a bug platform: nRF Nordic nRFx priority: medium Medium impact/importance bug
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants