8000 stm32/nimble: Don't process background event queue until stack is active. by andrewleech · Pull Request #6279 · micropython/micropython · GitHub
[go: up one dir, main page]

Skip to content

stm32/nimble: Don't process background event queue until stack is active. #6279

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

Closed

Conversation

andrewleech
Copy link
Contributor

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.

@andrewleech
Copy link
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
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.

ubluetooth: nimble fatal assert when using nimble hci controller
2 participants
0