Skip to content

STM32WB : update BLE part with better support #12384

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

Merged
merged 5 commits into from
Feb 21, 2020

Conversation

jeromecoutant
Copy link
Collaborator

Summary of changes

Few update around STM32WB BLE support:

  • debug logs is unified with mbed-trace method
  • BLE FW version is available in the logs when enabled
  • a readme file is added to help customers to understand, use and debug BLE part

@LMESTM
@donatieng

Regards,

Impact of changes

Migration actions required

Documentation


Pull request type

[x] Patch update (Bug fix / Target update / Docs update / Test update / Refactor)
[] 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


@jeromecoutant jeromecoutant changed the title STM32WB STM32WB : update BLE part with better support Feb 6, 2020
@ciarmcom ciarmcom requested review from a team February 6, 2020 18:00
@ciarmcom
Copy link
Member

ciarmcom commented Feb 6, 2020

@jeromecoutant, thank you for your changes.
@ARMmbed/mbed-os-pan @ARMmbed/mbed-os-maintainers please review.

@0xc0170
Copy link
Contributor

0xc0170 commented Feb 10, 2020

I restarted Travis, later saw astyle failing. Please review once completed

bulislaw
bulislaw previously approved these changes Feb 11, 2020
Copy link
Member

@bulislaw bulislaw left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@ARMmbed/mbed-os-pan please have a look

@mergify mergify bot added needs: CI and removed needs: review labels Feb 11, 2020
Copy link
Contributor

@donatieng donatieng left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you @jeromecoutan! A couple of nits but looks good - I'll test it on our end once these are addressed.
Great to see the README too.

#include "otp.h"
#include "hw_conf.h" /* Common BLE file where BLE shared resources are defined */
// #include "hw_conf.h" /* Common BLE file where BLE shared resources are defined */
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should this just be removed?

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

agree

#include "sleep_api.h"
#include "us_ticker_api.h"
#include "us_ticker_data.h"
// #include "sleep_api.h"
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Same here

https://github.com/STMicroelectronics/STM32CubeWB/blob/master/how_to_program_wireless_stacks.txt

Latest BLE FW :
https://github.com/STMicroelectronics/STM32CubeWB/blob/master/Projects/STM32WB_Copro_Wireless_Binaries/stm32wb5x_BLE_Stack_fw.bin
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should we point the users to the LL-only version of the Wireless firmware (as we're using Cordio as the BLE stack)?
https://github.com/STMicroelectronics/STM32CubeWB/blob/master/Projects/STM32WB_Copro_Wireless_Binaries/stm32wb5x_BLE_HCILayer_fw.bin

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Let's discuss it with @LMESTM
Yes, HCILayer binary file should be sufficient for mbed-os application, but I never tested it...

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The current mbed code (cordio on top of HCI) can work with the 2 firmware version;; HCILayer or full stack. so yes we can point to users that they can use the HCI only version if they wish to. Nevertheless they will have to change the memory map on their own to benefit from the flash savings. I'd rather not change this memory map by default to avoid people to get first negative impression in case they try mbed with the default firmware and this doesn't work out of the box ...

@mergify mergify bot added needs: work and removed needs: CI labels Feb 11, 2020
@mergify mergify bot dismissed stale reviews from bulislaw and donatieng February 12, 2020 10:53

Pull request has been modified.

@0xc0170 0xc0170 requested review from donatieng and LMESTM February 12, 2020 13:17
Copy link
Contributor

@LMESTM LMESTM left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good to me - good clean-up !


return;
}
extern int mbed_sdk_inited;
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

does it remove a warning ?

0xc0170
0xc0170 previously approved these changes Feb 13, 2020
@0xc0170
Copy link
Contributor

0xc0170 commented Feb 13, 2020

Started CI meanwhile

@mergify mergify bot added needs: CI and removed needs: review labels Feb 13, 2020
@mbed-ci
Copy link

mbed-ci commented Feb 13, 2020

Test run: SUCCESS

Summary: 11 of 11 test jobs passed
Build number : 1
Build artifacts

donatieng
donatieng previously approved these changes Feb 18, 2020
Copy link
Contributor

@donatieng donatieng left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks @jeromecoutant.

I'd just like to emphasize that it would be very valuable to have the "Link Layer only" option working out of the box, especially as an application pulling in the full stack will need to reserve 324 kB of flash (162kB x2 as we need to reserve the same amount of Flash to update it), which would only leave 188kB free for the app when using a part with 512 kB of Flash.
This would compare to reserving 190 kB (95 kB x2) leaving 322 kB for the app if using the LL only binary.

@LMESTM
Copy link
Contributor

LMESTM commented Feb 18, 2020

@donatieng What do you mean to have the LL option would work out of the box ?
If anyone updates the default production BLE firmware and replaces it with the LL only option, this will work without any change to the mbed-os application - so what would you like to do on top of that ?

@donatieng
Copy link
Contributor

@LMESTM I was referring to the memory map changes you are mentioning - the way I understand it the user would have to make these changes manually?

@LMESTM
Copy link
Contributor

LMESTM commented Feb 19, 2020

@donatieng yes the memory map change would have to be done manually - I am not sure how to make this transparent ...

@mergify mergify bot added the needs: work label Feb 19, 2020
@mergify
Copy link

mergify bot commented Feb 19, 2020

This PR cannot be merged due to conflicts. Please rebase to resolve them.

@mergify mergify bot removed the needs: review label Feb 19, 2020
@0xc0170
Copy link
Contributor

0xc0170 commented Feb 19, 2020

@jeromecoutant Once rebase we run the CI

@0xc0170 0xc0170 added release-version: 6.0.0-alpha-3 and removed release-version: 6.0.0-alpha-2 Second pre-release version of 6.0.0 labels Feb 19, 2020
@mergify mergify bot dismissed stale reviews from donatieng and 0xc0170 February 20, 2020 08:21

Pull request has been modified.

@jeromecoutant
Copy link
Collaborator Author

@jeromecoutant Once rebase we run the CI

Done

@0xc0170
Copy link
Contributor

0xc0170 commented Feb 21, 2020

CI started

@mbed-ci
Copy link

mbed-ci commented Feb 21, 2020

Test run: SUCCESS

Summary: 11 of 11 test jobs passed
Build number : 2
Build artifacts

@0xc0170 0xc0170 merged commit 72b2fcf into ARMmbed:master Feb 21, 2020
@mergify mergify bot removed the ready for merge label Feb 21, 2020
@jeromecoutant jeromecoutant deleted the PR_WBDEBUG branch March 2, 2020 09:33
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

7 participants