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

STM32F76x: Add support of dual bank flash mode #7088

Merged
merged 3 commits into from Jun 11, 2018

Conversation

Projects
None yet
7 participants
@bcostm
Contributor

bcostm commented Jun 1, 2018

Description

This PR adds support of Dual Bank flash mode on NUCLEO_F767ZI and DISCO_F769NI platforms.

Fixes Issue #6955

Tested OK using tests-mbed_drivers-flashiap and tests-mbed_hal-flash tests.

Note
The Single Bank mode is selected by default on these 2 boards.
To enable the Dual Bank mode you have to:

  • enable the FLASH_DUAL_BANK configuration using a json file
  • enable the Dual Bank in the option bytes using STLink-Utility software (uncheck the nDBANK box)
  • upgrade the STLink fw on the board to the latest version (V2.J30.M21 as of today)

Wiki page:
https://os.mbed.com/teams/ST/wiki/How-to-enable-flash-dual-bank

Pull request type

[X] Fix
[ ] Refactor
[ ] New target
[ ] Feature
[ ] Breaking change
@0xc0170

This comment has been minimized.

Member

0xc0170 commented Jun 4, 2018

@dhwalters423 Please review. Does this address the issue you reported?

@0xc0170 0xc0170 requested a review from dhwalters423 Jun 4, 2018

@0xc0170 0xc0170 requested a review from ARMmbed/team-st-mcd Jun 4, 2018

#ifdef MBED_CONF_TARGET_FLASH_DUAL_BANK
if ((OBInit.USERConfig & OB_NDBANK_SINGLE_BANK) == OB_NDBANK_SINGLE_BANK)
{
error("The Dual Bank mode option byte (nDBANK) must be enabled (box unchecked)\n");

This comment has been minimized.

@0xc0170

0xc0170 Jun 4, 2018

Member

@SenRamakri with the latest changes to the error handling, can you review this error handling

@0xc0170 0xc0170 requested a review from SenRamakri Jun 4, 2018

@bcostm bcostm force-pushed the bcostm:dev_F7_flash_dual_bank branch from 67fbdb1 to b79be41 Jun 4, 2018

@jeromecoutant

Code review done.
Tests also verified on my side with single and dual configuration.

@dhwalters423

Looks great! Thank you!

I was able to test this by cherry picking commit into Mbed OS 5.7.4, and running Simple Cloud Client 1.3 for the NUCLEO F767ZI: https://os.mbed.com/users/dwaltersARM/code/example-Ethernet-mbed-Cloud-connect/

I used the following sector layout for SOTP/RoT:
"app.sotp-section-1-address": "(0x081C0000)",
"app.sotp-section-1-size" : "(1281024)",
"app.sotp-section-2-address": "(0x081E0000)",
"app.sotp-section-2-size" : "(128
1024)"
(sectors 22 and 23 on the 767ZI)

The RoT was inserted and preserved correctly while stored in those sectors.

We should be sure to document the process with ST-Link utility to switch the platforms into Dual Bank mode on the platform page: https://os.mbed.com/platforms/ST-Nucleo-F767ZI/

@bcostm

This comment has been minimized.

Contributor

bcostm commented Jun 5, 2018

Thanks for the testing.

We should be sure to document the process with ST-Link utility to switch the platforms into Dual Bank mode

I will explain this in a WIKI page (in ST team area on mbed.org) as soon this PR is merged.

@0xc0170

0xc0170 approved these changes Jun 5, 2018

@0xc0170

This comment has been minimized.

Member

0xc0170 commented Jun 7, 2018

/morph build

@mbed-ci

This comment has been minimized.

mbed-ci commented Jun 7, 2018

Build : SUCCESS

Build number : 2265
Build artifacts/logs : http://mbed-os.s3-website-eu-west-1.amazonaws.com/?prefix=builds/7088/

Triggering tests

/morph test
/morph uvisor-test
/morph export-build
/morph mbed2-build

@cmonr

This comment has been minimized.

Contributor

cmonr commented Jun 7, 2018

Halting CI builds until RC3 PRs are completed. Will resume after.

@0xc0170

This comment has been minimized.

Member

0xc0170 commented Jun 8, 2018

/morph test
/morph export-build

@mbed-ci

This comment has been minimized.

@mbed-ci

This comment has been minimized.

@cmonr

This comment has been minimized.

Contributor

cmonr commented Jun 11, 2018

Looks good!

@cmonr cmonr merged commit 23bc4e0 into ARMmbed:master Jun 11, 2018

13 checks passed

AWS-CI uVisor Build & Test Success
Details
ci-morph-build build completed
Details
ci-morph-exporter build completed
Details
ci-morph-mbed2-build build completed
Details
ci-morph-test test completed
Details
continuous-integration/jenkins/pr-head This commit looks good
Details
continuous-integration/travis-ci/pr The Travis CI build passed
Details
travis-ci/astyle Passed, 919 files
Details
travis-ci/docs Local docs testing has passed
Details
travis-ci/events Passed, runtime is 8842 cycles (-677 cycles)
Details
travis-ci/gitattributestest Local gitattributestest testing has passed
Details
travis-ci/littlefs Passed, code size is 9964B (+0.00%)
Details
travis-ci/tools-py2.7 Local tools-py2.7 testing has passed
Details
@bcostm

This comment has been minimized.

Contributor

bcostm commented Jun 13, 2018

@mbed-ci

This comment has been minimized.

@bcostm bcostm deleted the bcostm:dev_F7_flash_dual_bank branch Jul 3, 2018

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment