Skip to content

Fix BMI088 driver getting stuck + GenericTimeout::wait() behavior#1353

Merged
salkinium merged 1 commit into
modm-io:developfrom
chris-durand:fix/timer_wait_bm088
Jun 11, 2026
Merged

Fix BMI088 driver getting stuck + GenericTimeout::wait() behavior#1353
salkinium merged 1 commit into
modm-io:developfrom
chris-durand:fix/timer_wait_bm088

Conversation

@chris-durand

Copy link
Copy Markdown
Member

Fix the BMI088 driver getting stuck during initialization. This was caused by a refactoring using GenericTimeout::wait().

The timer implementation is changed to wait as long as the timer is armed instead of waiting for execute() to return true. This prevents several edge cases where the wait function blocks indefinitely.

Fixes #1352

@chris-durand chris-durand added this to the 2026q2 milestone May 11, 2026
@chris-durand chris-durand requested a review from salkinium May 11, 2026 21:48
@chris-durand

Copy link
Copy Markdown
Member Author

I'll also add a unit test tomorrow

Also fixes the BMI088 driver getting stuck during initialization.

The current implementation blocks until execute() returns true. In case
wait() is used twice, execute() has been called on the expired timer or
the timer is stopped the program blocks forever.

This behaviour is unexpected and caused a bug in a refactoring of the
BMI088 driver. It gets stuck indefinitely during initialize() which
will be fixed by this change.
@chris-durand chris-durand force-pushed the fix/timer_wait_bm088 branch from 366182f to 2d8c1b4 Compare June 7, 2026 19:21
@chris-durand

Copy link
Copy Markdown
Member Author

@salkinium I've added the test

@salkinium salkinium left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you very much!

@salkinium salkinium merged commit 91dabcb into modm-io:develop Jun 11, 2026
12 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Development

Successfully merging this pull request may close these issues.

BMI088 driver getting stuck during initialisation

2 participants