Skip to content
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

STM32WB: Update Flash size #10479

Merged
merged 3 commits into from
May 12, 2019
Merged

Conversation

LMESTM
Copy link
Contributor

@LMESTM LMESTM commented Apr 25, 2019

Description

The flash is shared and split between cortex-M4 that
runs (mbed-os) application and the cortex-M0+ that
runs the BLE Low-level firmware stack.

The 512K allocated to the application was a conservative value

EDIT:
that can now be updated with official ; 768KB as BLE firmware is being flashed strating from @ 0x080C0000 (or further address).

Pull request type

[ ] Fix
[ ] Refactor
[ x] Target update
[ ] Functionality change
[ ] Docs update
[ ] Test update
[ ] Breaking change

Reviewers

@jeromecoutant

Release Notes

@ciarmcom ciarmcom requested a review from a team April 25, 2019 15:00
@ciarmcom
Copy link
Member

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

@jeromecoutant
Copy link
Collaborator

Hi
Should we also update:

#define FLASH_SIZE ((uint32_t)0x80000) // 128 pages x 4 Kbytes = 512 Kbytes

and

#define FLASH_SIZE (((uint32_t)(*((uint16_t *)FLASHSIZE_BASE)) & (0x07FFUL)) << 10U)

?

@LMESTM
Copy link
Contributor Author

LMESTM commented Apr 26, 2019

mbed-os/targets/TARGET_STM/TARGET_STM32WB/TARGET_STM32WB55xG/device/flash_data.h

Line 41 in 46603f8

#define FLASH_SIZE ((uint32_t)0x80000) // 128 pages x 4 Kbytes = 512 Kbytes

Yes I will update this one.
It is used, only in case the one below is not defined ...

and

mbed-os/targets/TARGET_STM/TARGET_STM32WB/device/stm32wbxx_hal_flash.h

Line 810 in 46603f8

#define FLASH_SIZE (((uint32_t)(*((uint16_t *)FLASHSIZE_BASE)) & (0x07FFUL)) << 10U)
?

This one doesn't need update and is already right.
This is the HW definition of the actual FLASH_SIZE and that should be ok like this.

@LMESTM
Copy link
Contributor Author

LMESTM commented Apr 26, 2019

PR updated

@0xc0170 0xc0170 requested a review from a team April 29, 2019 07:28
Copy link
Collaborator

@jeromecoutant jeromecoutant left a comment

Choose a reason for hiding this comment

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

ST CI tests executed.
Some tests becomes FAIL.

@0xc0170
Copy link
Contributor

0xc0170 commented May 2, 2019

Some tests becomes FAIL.

The failures will be fixed within this PR? Or is this related to recent flash/kvstore failures (fixed today) ?

@LMESTM LMESTM force-pushed the more_flash_for_stm32wb_app branch from 1b87f6f to c4bc6be Compare May 6, 2019 09:12
LMESTM added 2 commits May 6, 2019 11:31
the flash is shared and split between cortex-M4 that
runs (mbed-os) application and the cortex-M0+ that
runs the BLE firmware.

The 512K allocated to the application was a
conservative that can now be updated.

With recent up-to-date BLE firmware flashed @ 0x080CB000,
there should be 812K available to application.

But there are boards out there that don't have an up-to-date
firmware, so we're keeping an intermediate, safer,
application size of 768K.
By default, FLASH_SIZE should be read from HW.
In case this is not the case, we define it here, as the size of FLASH
that is available to the application running on M4.
@LMESTM LMESTM force-pushed the more_flash_for_stm32wb_app branch from c4bc6be to fcc375f Compare May 6, 2019 09:31
@adbridge
Copy link
Contributor

adbridge commented May 8, 2019

@jeromecoutant are you happy with the updates ?

Copy link
Collaborator

@jeromecoutant jeromecoutant left a comment

Choose a reason for hiding this comment

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

Minor comment for Laurent:
Maybe PR description should be updated ?

@LMESTM
Copy link
Contributor Author

LMESTM commented May 9, 2019

Minor comment for Laurent:
Maybe PR description should be updated ?

Thx, done

@LMESTM
Copy link
Contributor Author

LMESTM commented May 9, 2019

Note: I added a commit to fix a missing size update

@0xc0170
Copy link
Contributor

0xc0170 commented May 10, 2019

CI started

@mbed-ci
Copy link

mbed-ci commented May 10, 2019

Test run: SUCCESS

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

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.

6 participants