Skip to content

Conversation

JordanYates
Copy link
Contributor

If the initial pm_device_runtime_get function call fails, try and
re-establish comms with the modem before giving up. Hopefully this
resolves a looping error where the task keeps being restarted due to
comms failures but never comes good.

Since we don't get a MON-RXR message on wake, run a test command to
validate comms on resume. This ensures that `pm_device_runtime_get`
returns an error if comms is failing.

Signed-off-by: Jordan Yates <[email protected]>
Move the PM function up in the file so we can refer to it from the init
function.

Signed-off-by: Jordan Yates <[email protected]>
Copy link

codecov bot commented Apr 5, 2025

Codecov Report

Attention: Patch coverage is 73.68421% with 5 lines in your changes missing coverage. Please review.

Files with missing lines Patch % Lines
drivers/gnss/gnss_u_blox_m8_emul.c 78.57% 3 Missing ⚠️
subsys/task_runner/tasks/task_gnss_ubx.c 60.00% 0 Missing and 2 partials ⚠️

📢 Thoughts on this report? Let us know!

Move the PM functions to the common configuration struct so we don't
need to pass around a `struct ubx_common_pm_fn*` everywhere.

Signed-off-by: Jordan Yates <[email protected]>
Add a function to attempt to resynchronise communications with the
u-blox modem without a physical power cycle.

Signed-off-by: Jordan Yates <[email protected]>
If the initial `pm_device_runtime_get` function call fails, try and
re-establish comms with the modem before giving up. Hopefully this
resolves a looping error where the task keeps being restarted due to
comms failures but never comes good.

Signed-off-by: Jordan Yates <[email protected]>
Ensure that `ubx_modem_comms_reset` is called if `pm_device_runtime_get`
fails on the first call. The task should then run successfully.

Signed-off-by: Jordan Yates <[email protected]>
@JordanYates JordanYates force-pushed the feature/gnss_hw_reset branch from b8f52a8 to d623e8f Compare April 5, 2025 10:33
@JordanYates JordanYates merged commit 85491e7 into main Apr 5, 2025
12 checks passed
@JordanYates JordanYates deleted the feature/gnss_hw_reset branch April 5, 2025 11:32
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

Successfully merging this pull request may close these issues.

1 participant