Skip to content

Add support for low power applications #71

@tfranssen

Description

@tfranssen

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions