stm32/nimble: Don't process background event queue until stack is active.#6279
Closed
andrewleech wants to merge 1 commit intomicropython:masterfrom
Closed
stm32/nimble: Don't process background event queue until stack is active.#6279andrewleech wants to merge 1 commit intomicropython:masterfrom
andrewleech wants to merge 1 commit intomicropython:masterfrom
Conversation
Contributor
Author
|
This has been dealt with more cleanly in #6343 |
tannewt
pushed a commit
to tannewt/circuitpython
that referenced
this pull request
May 12, 2022
Added Settable Clock for MIMXRT BOARDS
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Resolves #6269
I still haven't confirmed whether this is a "correct" fix for the issue, however my mynewt/nimble based hci radio sometimes causes the assert in the linked issue without this change, but never throws the issue with it.
My pybd seems to work fine with the change too.
It does warrant some further investigation however.
To the best of my understanding, the assert is in a timer expired function. I think the timer is started near the top of the ble_hs_startup_go() function, but is serviced in the background event loop.
If that ble_hs_startup_go() function takes long enough the timer expires, the expiry callback is called in the background task.
That's not allowed to happen during BLE_HS_SYNC_STATE_BRINGUP though.