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

[mavlink 200Hz 2/2] semaphore race condition fixes from 1.13 #253

Merged
merged 2 commits into from May 13, 2024

Conversation

t-salminen
Copy link
Collaborator

Cherry-picked SPI and I2C semaphore race condition fixes from 1.13_fc_only

SPI TX_DONE interrupt can be received after a semaphore timeout,
but before interrupts are disabled. This will leave the semaphore
to the signaled state.

After a timeout the semaphore is always reset to non-signaled state
to fix this race condition.

Signed-off-by: Tero Salminen <tero.salminen@unikie.com>
MPFS_I2C_ST_STOP_SENT interrupt might be received right after semaphore timeout,
which would cause the semaphore to be in the incorrect signaled state when the
next transfer starts.

Signed-off-by: Tero Salminen <tero.salminen@unikie.com>
@t-salminen
Copy link
Collaborator Author

@jnippula, these should go in together with flat build 1ms tick change

@t-salminen t-salminen merged commit 34c17a5 into master May 13, 2024
11 checks passed
@t-salminen t-salminen deleted the semaphore_race branch May 13, 2024 09:46
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
2 participants