-
Notifications
You must be signed in to change notification settings - Fork 3k
Add support for Cordio to NRF52 Devices #8876
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
Add support for Cordio to NRF52 Devices #8876
Conversation
sigh And here I was ready to blow a gasket. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I can see a single .a
file; is it a universal library ?
Could you mention qualification status in the README ?
What's the status on inclusion of uECC ?
@@ -306,7 +306,7 @@ struct GapAdvertisingReportEvent : public GapEvent { | |||
struct advertising_t { | |||
received_advertising_type_t type; | |||
connection_peer_address_type_t address_type; | |||
const address_t& address; | |||
address_t address; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Any reason for that change ?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The commit adding the initial change says "Fix advertising_t in GapEvents.h having a reference to an inexisting address_t instance". I'm not sure which usage of it caused the issue though.
...s/FEATURE_BLE/targets/TARGET_NORDIC/TARGET_NORDIC_CORDIO/TARGET_NRF5x/NRFCordioHCIDriver.cpp
Show resolved
Hide resolved
void NRFCordioHCIDriver::start_reset_sequence() | ||
{ | ||
// Make sure extended adv is init | ||
DmExtAdvInit(); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Any reason to put that here ?
That function is called by Cordio BLE if the controller supports extended advertising.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This needs to be called before the reset sequence to activate the extended reset sequence required to fetch extended advertising related info (number of advertising sets supported, etc)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm disappointed with the inconsistency of the reset sequence with EA; I suppose we should enable it by default in CordioBLE then if not supported fallback to legacy.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Agreed
* RADIO | ||
* TIMER0 | ||
* PPI channels 14 and 15 | ||
* HF clock is enabled |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is it always on ? That's gonna be an issue for power consumption.
@pan- good catch, |
if (wsf_ticks > 0) { | ||
WsfTimerUpdate(wsf_ticks); | ||
|
||
_last_update_us -= (last_update_ms * 1000); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
_last_update_us -= (last_update_ms * 1000); | |
_last_update_us -= (wsf_ticks * WSF_MS_PER_TICK * 1000); |
otherwise you're losing milliseconds that aren't passed in as ticks
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I skimmed the code and sanity checked the integration. Someone else needs to have a look at the code.
There are currently two .a files. One contains the Cordio LL library
I'll add a license and README for each library
The uECC is included as source in |
@scartmell-arm
I think @pan- was wondering if it worked across all toolchains (both NRF52840 and NFR52832 are CM4s so we only need Armv7-m in terms of architecture) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The most of the files are for the library, looks good to me.
The only request is as my above comment - add licenses for binaries and readme describing them. As soon as they are in, will be approved by me
While developing the compiled libraries worked with all 3 toolchains. |
Thanks for confirming @scartmell-arm |
@ARMmbed/mbed-os-maintainers we should be ready for CI |
(Added compiler info asked by @0xc0170) |
Somehow during the rebase, both have been inverted.
7834219
to
c998248
Compare
CI started |
We are investigating failures now |
@OPpuolitaival Please review dynamic-memory-usage |
test and dynamic usage were restarted (issues should be fixed now in CI) |
Test run: SUCCESSSummary: 4 of 4 test jobs passed |
The last one for 5.11 rc1 is going in 💯 |
YAY! Thanks @ARMmbed/mbed-os-maintainers @ARMmbed/mbed-os-pan ! |
In PR ARMmbed#8876 when we added Cordio support for nRF52* targets, we attempted to use an RTOS idle hook to workaround sleep latency issues. However, the condition to bypass sleeps never gets satisfied, and BLE nRF52* targets have generally worked fine over the past year. This commit removes the hook to avoid dependency on RTOS, enabling BLE on bare metal.
Description
This PR adds optional support for the Cordio 5.0 stack to NRF52x targets.
This is achieved by running the Cordio Link Layer (released under the PBL) on these platforms.
Pull request type