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

Add support for low power applications #71

Open
tfranssen opened this issue Dec 28, 2023 · 0 comments
Open

Add support for low power applications #71

tfranssen opened this issue Dec 28, 2023 · 0 comments

Comments

@tfranssen
Copy link

I am just starting to use this reference design template. Its a great start for many projects, well done!

It would be nice to have a low power state supported. Right now I added PSM features and I have to stop golioth system using
golioth_system_client_stop()
otherwise PSM state will never initiated due to communication to the cloud.

If I change the main loop to this:

while (true) {
	golioth_system_client_start();
	k_sem_take(&connected, K_FOREVER);		
	app_work_sensor_read();
	golioth_system_client_stop();		
	k_sleep(K_SECONDS(get_loop_delay_s()));
}

I get some errors due to failed observations:

[00:04:12.452,392] <err> app_dfu: Error while receiving desired FW update: -110
[00:04:12.452,423] <err> golioth: Error on Settings observation: -110
[00:04:12.452,453] <err> golioth: Error on RPC observation: -110
[00:04:12.452,484] <err> app_state: Failed to receive 'desired' endpoint: -110

I switched the async LightDB stream function to sync function without the callback and everything works as expected except for the RPC functionality since the device is not online. I did not test the DFU functionality. Sleep current is 50 uA using a custom board.

It would be nice to have a setting that enables or disables PSM.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant