Skip to content

STM32WB - Update CubeDriver from v1.0.0 to v1.4.0 #12283

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 11 commits into from
Jan 25, 2020

Conversation

jeromecoutant
Copy link
Collaborator

Summary of changes

Goal is to update mbed-os file from the latest STM32CubeWB MCU Firmware Package:
https://www.st.com/en/embedded-software/stm32cubewb.html
https://github.com/STMicroelectronics/STM32CubeWB

Impact of changes

Several changes are proposed in several commits:

  • new directory structure as agreed in TARGET_STM: FW driver files refactor proposition #12201
  • BLE driver files coming from STM32Cube package are moved to TARGET_STM/TARGET_STM32WB/STM32Cube_FW/STM32_WPAN
  • STM32W50xx MCU are introduced
  • BLE is considered as mandatory feature for this STM32 family

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


Reviewers

@ARMmbed/team-st-mcd


@jeromecoutant
Copy link
Collaborator Author

@donatieng

@ciarmcom
Copy link
Member

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

@ciarmcom ciarmcom requested review from a team January 20, 2020 18:00
@jeromecoutant jeromecoutant requested review from LMESTM and a team and removed request for a team January 21, 2020 08:05
donatieng
donatieng previously approved these changes Jan 22, 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.

I've looked at the Bluetooth part and carried some tests and it looks good to me, thank you @jeromecoutant

@mergify mergify bot added needs: CI and removed needs: review labels Jan 22, 2020
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.

Single question: maybe one header file (hw_if.h) is not needed ? ?

@@ -0,0 +1,250 @@
/* USER CODE BEGIN Header */
Copy link
Contributor

Choose a reason for hiding this comment

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

Is this file needed in our MBED port ?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Yes, it can be removed.
Just need to move 2 include lines.

@mergify mergify bot dismissed donatieng’s stale review January 23, 2020 09:59

Pull request has been modified.

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.

Good job - thanks Jerome !

Copy link
Contributor

@adbridge adbridge left a comment

Choose a reason for hiding this comment

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

Some minor comments/questions...

@@ -62,14 +62,14 @@
In this case, these drivers will not be included and the application code will
be based on direct access to peripherals registers
*/
#define USE_HAL_DRIVER
/*#define USE_HAL_DRIVER */
Copy link
Contributor

Choose a reason for hiding this comment

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

Why is this commented out rather than 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.

All files in this STM32Cube_FW directory come from the ST driver FW delivery.
Before we were patching few files during mbed import.
Now I remove all differences between official ST files and mbed imported files.

{
CLEAR_BIT(FLASH->CR, clearbit);
/* No Procedure on-going */
/* Nothing to do, but check error if any */
Copy link
Contributor

Choose a reason for hiding this comment

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

This comment as it stands in this place makes it look like there is some missing error code in this block? I assume the intention is that you are just documenting that there is nothing to do in the default else case and it will just fall through to the error checking below ?

{
/* SAI_I2S_MSBJUSTIFIED or SAI_I2S_LSBJUSTIFIED */
hsai->FrameInit.FSPolarity = SAI_FS_ACTIVE_HIGH;
hsai->FrameInit.FSOffset = SAI_FS_FIRSTBIT;
Copy link
Contributor

Choose a reason for hiding this comment

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

I assume the protocol can only ever be one of the 3 specified values ?

else
{
/* SAI_PCM_LONG */
hsai->FrameInit.ActiveFrameLength = 13;
Copy link
Contributor

Choose a reason for hiding this comment

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

Same question here wrt protocol values ?

@adbridge
Copy link
Contributor

CI started

@mbed-ci
Copy link

mbed-ci commented Jan 24, 2020

Test run: SUCCESS

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

@donatieng
Copy link
Contributor

Hi @adbridge, it would be great to have this included in the upcoming release as discussed with @MarceloSalazar

@adbridge adbridge merged commit ceaf562 into ARMmbed:master Jan 25, 2020
@mergify
Copy link

mergify bot commented Jan 25, 2020

This PR does not contain release version label after merging.

@jeromecoutant jeromecoutant deleted the PR_STM32WB branch January 27, 2020 13:12
@bulislaw
Copy link
Member

bulislaw commented Feb 4, 2020

This is a huge change for a patch release. Makes me a bit uncomfortable but If @ARMmbed/team-st-mcd is confident and ok with merging it to 15.15.1 lets do it.

@adbridge
Copy link
Contributor

@bulislaw this didn't get marked for 5.15.1 in the review meeting so looks like it didn't make it to that release. @jeromecoutant is this really important for the 5.15 branch ?

@adbridge adbridge added the release-version: 6.0.0-alpha-2 Second pre-release version of 6.0.0 label Feb 19, 2020
@adbridge
Copy link
Contributor

adbridge commented Apr 8, 2020

@jeromecoutant as you haven't indicated otherwise I'm going to assume this is currently not seen as important for the 5.15 branch/releases. If this is not the case, please raise a corresponding PR against mbed-os-5.15 and it will be considered for inclusion there.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
release-version: 6.0.0-alpha-2 Second pre-release version of 6.0.0
Projects
None yet
Development

Successfully merging this pull request may close these issues.

7 participants