-
Notifications
You must be signed in to change notification settings - Fork 3k
Support to BlueNRG_2 BLE component #13246
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
Conversation
Grazie Andrea!
Ciao
Antonio
From: Andrea Palmieri <[email protected]>
Sent: Wednesday, July 8, 2020 10:07 AM
To: ARMmbed/mbed-os <[email protected]>
Cc: Antonio VILEI <[email protected]>; Mention <[email protected]>
Subject: [ARMmbed/mbed-os] Support to BlueNRG_2 BLE component (#13246)
Summary of changes
Add support to BlueNRG_2 BLE Component
Documentation
…________________________________
Pull request type
[] Patch update (Bug fix / Target update / Docs update / Test update / Refactor)
[X] Feature update (New feature / Functionality change / New API)
[] Major update (Breaking change E.g. Return code change / API behaviour change)
________________________________
Test results
[] No Tests required for this change (E.g docs only update)
[X] Covered by existing mbed-os tests (Greentea or Unittest)
[] Tests / results supplied as part of this PR
________________________________
Reviewers
@pan-<https://github.com/pan-> @MarceloSalazar<https://github.com/MarceloSalazar> @avilei<https://github.com/avilei> @jeromecoutant<https://github.com/jeromecoutant> @LMESTM<https://github.com/LMESTM>
________________________________
You can view, comment on, or merge this pull request online at:
#13246
Commit Summary
* Add support to BlueNRG_2 BLE component
* Merge remote-tracking branch 'upstream/master'
File Changes
* A components/BLE/COMPONENT_BlueNRG_2/BlueNrg2HCIDriver.cpp<https://github.com/ARMmbed/mbed-os/pull/13246/files#diff-73a308bd6793189a639cc1f6c4ac8fa7> (532)
* A components/BLE/COMPONENT_BlueNRG_2/README.md<https://github.com/ARMmbed/mbed-os/pull/13246/files#diff-ca102807796883d4c8e2629175d60a2a> (108)
* A components/BLE/COMPONENT_BlueNRG_2/mbed_lib.json<https://github.com/ARMmbed/mbed-os/pull/13246/files#diff-b6f32dbd795cd0324c54728c2de2955a> (15)
Patch Links:
* https://github.com/ARMmbed/mbed-os/pull/13246.patch
* https://github.com/ARMmbed/mbed-os/pull/13246.diff
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub<#13246>, or unsubscribe<https://github.com/notifications/unsubscribe-auth/ADUCNIZGXBMM4Y72FZ5R4T3R2QSKBANCNFSM4OUJQUBA>.
|
@apalmieriGH, thank you for your changes. |
|Module Name|Processor Name|Bluetooth compliance|Status|Used in shields & boards|Link| | ||
|-------------|-----------|-----|-|-|-| | ||
|SPBTLE-RF |BlueNRG-MS (network processor) |v4.1 |Not recommended for new designs |X-NUCLEO-IDB05A1, DISCO-L475VG-IOT01A, DISCO-L562QE | https://www.st.com/en/wireless-transceivers-mcus-and-modules/spbtle-rf.html | | ||
|BlueNRG-M0 |BlueNRG-MS (network processor) |v4.2 |Active (included in ST's Longevity Program) |X-NUCLEO-IDB05A2 (coming soon) | https://www.st.com/en/wireless-transceivers-mcus-and-modules/bluenrg-m0.html | |
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.
Table in COMPONENT_BlueNRG_MS/README.md has to be updated ?
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 would suggest to update and align the table in COMPONENT_BlueNRG_MS/README.md as well.
|
||
In order to use this library with X-NUCLEO-BNRG2A1, you need to update the firmware of the BLUENRG-M2SP BLE module mounted on that expansion board as described in the following page: | ||
|
||
[TODO BlueNRG-2](https://os.mbed.com/components/X-NUCLEO-BNRG2A1/) |
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.
Link doesn't work
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.
It is just a bookmark for now.
|
||
Bluetooth Low Energy Nucleo Expansion Board: | ||
|
||
https://os.mbed.com/components/X-NUCLEO-BNRG2A1/ |
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.
Link doesn't work
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.
Just a bookmark for now.
virtual void initialize() | ||
{ | ||
// Setup the spi for 8 bit data, low clock polarity, | ||
// 2-edge phase, with an 1MHz clock rate (rate to be checked) |
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.
Avoid comment like "to be checked" :-)
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.
Agree :-)
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.
None "to be done" in the code 💯
uint16_t spiWrite(uint8_t type, const uint8_t *data, uint16_t data_length) | ||
{ | ||
static const uint8_t header_master[] = { 0x0a, 0x00, 0x00, 0x00, 0x00 }; | ||
uint8_t header_slave[5];// = { 0xaa, 0x00, 0x00, 0x00, 0x00 }; |
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.
comment to remove ?
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.
Agree
|Settings|Pin 1|Pin 2|Pin 3| | ||
|--------|-----|-----|-----| | ||
|**D3** |Open |Short|Short| | ||
|**D13** |Short|Short|Open | | ||
|
||
In case you change the default configuration, then you also have to configure this library to use pin **D13** to drive the SPI clock. | ||
To this aim you need to update your local mbed_app.json file with: | ||
|
||
``` | ||
"target_overrides": { | ||
"XXXX": { | ||
"bluenrg_2.SPI_SCK": "D13" | ||
}, | ||
``` | ||
|
||
If you use pin **D13** for the SPI clock, please be aware that on some STM32 Nucleo boards you may **not** drive the LED, | ||
otherwise you will get a conflict: the LED on STM32 Nucleo boards is connected to pin **D13**. | ||
|
||
Referring to the current list of tested platforms (see [X-NUCLEO-BNRG2A1](https://os.mbed.com/components/X-NUCLEO-BNRG2A1/) page), | ||
the patch is required for | ||
- [ST-Nucleo-F103RB](https://developer.mbed.org/platforms/ST-Nucleo-F103RB/) | ||
- [ST-Nucleo-F411RE](https://developer.mbed.org/platforms/ST-Nucleo-F411RE/) | ||
- [ST-Nucleo-F446RE](https://developer.mbed.org/platforms/ST-Nucleo-F446RE/) | ||
- [FRDM-K64F](https://developer.mbed.org/platforms/FRDM-K64F/) | ||
|
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 this part valid ? tested ?
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.
Not tested, yet. But the behavior should be the same as for X-NUCLEO-IDB05A1 (BlueNRG_MS component). Anyway, I'll update/rephrase the readme accordingly.
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.
Why there is no BlueNrg2HCIDriver.h
, but all is in BlueNrg2HCIDriver.cpp
?
#include "hci_mbed_os_adaptation.h" | ||
|
||
// rtos | ||
#include "Thread.h" |
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.
lets use prefixes like on line 22, rtos/header.h
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 structure of the folder is the same as components/BLE/COMPONENT_BlueNRG_MS
Please remove merge commit 572b384 and rebase instead. We will start CI asap |
@apalmieriGH I am reviewing, and noticed there are merge commits still. Would you be able to rebase? Or if not , I can fetch the branch and try to clean the history (it should be linear to show only changes related to this branch). |
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.
Waiting for the rebase to clean up the history
@0xc0170 tried to rebase. Could it work now? |
@ARMmbed/mbed-os-pan Please review |
Signed-off-by: Andrea PALMIERI <[email protected]>
Signed-off-by: Andrea PALMIERI <[email protected]>
Signed-off-by: Andrea PALMIERI <[email protected]>
Signed-off-by: Andrea PALMIERI <[email protected]>
Signed-off-by: Andrea PALMIERI <[email protected]>
Signed-off-by: Andrea PALMIERI <[email protected]>
Signed-off-by: Andrea PALMIERI <[email protected]>
also correctly set unused addres to 0s as required by spec
Signed-off-by: Andrea PALMIERI <[email protected]>
Signed-off-by: Andrea PALMIERI <[email protected]>
Signed-off-by: Andrea PALMIERI <[email protected]>
Signed-off-by: Andrea PALMIERI <[email protected]>
Signed-off-by: Andrea PALMIERI <[email protected]>
CI started |
Jenkins CI Test : ✔️ SUCCESSBuild Number: 3 | 🔒 Jenkins CI Job | 🌐 Logs & ArtifactsCLICK for Detailed Summary
|
I'll squash merge this, there are lot of readme updates, one commit looks better for this update. |
Summary of changes
Add support to BlueNRG_2 BLE Component
Documentation
Pull request type
Test results
Reviewers
@pan- @MarceloSalazar @avilei @jeromecoutant @LMESTM