Skip to content

Fixing BLE priorities and making them configurable#934

Closed
pwilkowski wants to merge 2 commits into
h2zero:masterfrom
pwilkowski:master
Closed

Fixing BLE priorities and making them configurable#934
pwilkowski wants to merge 2 commits into
h2zero:masterfrom
pwilkowski:master

Conversation

@pwilkowski
Copy link
Copy Markdown

as per #933

i checked it in my local project and it seem to work file for nrf52840

@h2zero
Copy link
Copy Markdown
Owner

h2zero commented Apr 12, 2025

Thanks @pwilkowski, I will merge this shortly, just need to test a few things first.

@h2zero
Copy link
Copy Markdown
Owner

h2zero commented Apr 18, 2025

@pwilkowski Looks like there are some issues with this, causes errors on some of my boards. What needs to be done is the timer task needs to be lower priority than the controller task. I have added this to the nimble core 1.6 PR #891 and you can see the implementation here: https://github.com/h2zero/NimBLE-Arduino/blob/nimble-core-1.6/src/nimble/porting/npl/freertos/src/nimble_port_freertos.c

This requires an update to the n-able core timer task priority to work correctly, I set it to 2, which works great.

@pwilkowski
Copy link
Copy Markdown
Author

@h2zero that is weird, because it totally fixed my issues. And my timer still has highest priority. Which board are you talking about?

Generally if possible, please make all priorities configurable. My task stack is pretty complex and i needed to fiddle around to make USB, BLE and internal tasks working fine. Solution was pretty straightforward tho, just assign each task its own unique priority and sort them out.

@h2zero
Copy link
Copy Markdown
Owner

h2zero commented Apr 18, 2025

The issue was in nimble 1.6 with an nrf52833.

I will be making all of these configurable. For now please update this PR to match the code in the 1.6 PR so I can merge this PR.

@pwilkowski
Copy link
Copy Markdown
Author

@h2zero i think i updated it correctly, please check

@h2zero
Copy link
Copy Markdown
Owner

h2zero commented Apr 22, 2025

Thanks @pwilkowski, unfortunately the build failed. I have merged the nimble 1.6 update that has the changes in it though so this will no longer apply.

@h2zero h2zero closed this Apr 22, 2025
@pwilkowski
Copy link
Copy Markdown
Author

That is weird but I see its configurable now so all good.

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.

2 participants