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

Conversation

Projects
None yet
6 participants
@LMESTM
Copy link
Contributor

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 ARMmbed/mbed-os-maintainers Apr 25, 2019

@ciarmcom

This comment has been minimized.

Copy link
Member

commented Apr 25, 2019

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

@jeromecoutant

This comment has been minimized.

Copy link
Contributor

commented Apr 25, 2019

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

This comment has been minimized.

Copy link
Contributor Author

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

This comment has been minimized.

Copy link
Contributor Author

commented Apr 26, 2019

PR updated

@0xc0170 0xc0170 requested a review from ARMmbed/team-st-mcd Apr 29, 2019

@jeromecoutant
Copy link
Contributor

left a comment

ST CI tests executed.
Some tests becomes FAIL.

@0xc0170 0xc0170 added needs: work and removed needs: review labels Apr 30, 2019

@0xc0170

This comment has been minimized.

Copy link
Member

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 LMESTM:more_flash_for_stm32wb_app branch from 1b87f6f to c4bc6be May 6, 2019

LMESTM added some commits Apr 5, 2019

STM32WB: Update Flash size
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.
Update FLASH_SIZE backup value
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 LMESTM:more_flash_for_stm32wb_app branch from c4bc6be to fcc375f May 6, 2019

@adbridge

This comment has been minimized.

Copy link
Contributor

commented May 8, 2019

@jeromecoutant are you happy with the updates ?

@adbridge adbridge added needs: CI and removed needs: work labels May 8, 2019

@jeromecoutant
Copy link
Contributor

left a comment

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

@LMESTM

This comment has been minimized.

Copy link
Contributor Author

commented May 9, 2019

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

Thx, done

@LMESTM

This comment has been minimized.

Copy link
Contributor Author

commented May 9, 2019

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

@0xc0170

This comment has been minimized.

Copy link
Member

commented May 10, 2019

CI started

@mbed-ci

This comment has been minimized.

Copy link

commented May 10, 2019

Test run: SUCCESS

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

@0xc0170 0xc0170 merged commit 773729f into ARMmbed:master May 12, 2019

26 checks passed

continuous-integration/jenkins/pr-head This commit looks good
Details
continuous-integration/travis-ci/pr The Travis CI build passed
Details
jenkins-ci/build-ARM Success
Details
jenkins-ci/build-GCC_ARM Success
Details
jenkins-ci/build-IAR Success
Details
jenkins-ci/cloud-client-test Success
Details
jenkins-ci/dynamic-memory-usage Success
Details
jenkins-ci/exporter Success
Details
jenkins-ci/greentea-test Success
Details
jenkins-ci/mbed2-build-ARM Success
Details
jenkins-ci/mbed2-build-GCC_ARM Success
Details
jenkins-ci/mbed2-build-IAR Success
Details
jenkins-ci/unittests Success
Details
travis-ci/astyle Success!
Details
travis-ci/docs Success!
Details
travis-ci/doxy-spellcheck Success!
Details
travis-ci/events Success! Runtime is 8618 cycles.
Details
travis-ci/gitattributestest Success!
Details
travis-ci/include_check Success!
Details
travis-ci/licence_check Success!
Details
travis-ci/littlefs Success! Code size is 8448B.
Details
travis-ci/psa-autogen Success!
Details
travis-ci/tools-py2.7 Success!
Details
travis-ci/tools-py3.5 Success!
Details
travis-ci/tools-py3.6 Success!
Details
travis-ci/tools-py3.7 Success!
Details
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.