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

STM32: Lock / Unlock flash for each operation #5026

Merged
merged 1 commit into from Sep 27, 2017

Conversation

Projects
None yet
4 participants
@LMESTM
Contributor

LMESTM commented Sep 5, 2017

Description

Rather than Unlocking flash during flash object creation, and leaving
the flash possibly continuously unlocked a(s object might bever be freed),
we decide to Unlock then Lock again at each erase or program call.

This solves issue #4967

Status

READY

TESTS

  • L0
+-------------------+---------------+-----------------------------+--------+--------------------+-------------+
| target            | platform_name | test suite                  | result | elapsed_time (sec) | copy_method |
+-------------------+---------------+-----------------------------+--------+--------------------+-------------+
| NUCLEO_L073RZ-ARM | NUCLEO_L073RZ | tests-mbed_drivers-flashiap | OK     | 80.59              | shell       |
| NUCLEO_L073RZ-ARM | NUCLEO_L073RZ | tests-mbed_hal-flash        | OK     | 79.9               | shell       |
+-------------------+---------------+-----------------------------+--------+--------------------+-------------+
  • L1
+-------------------+---------------+-----------------------------+--------+--------------------+-------------+
| target            | platform_name | test suite                  | result | elapsed_time (sec) | copy_method |
+-------------------+---------------+-----------------------------+--------+--------------------+-------------+
| NUCLEO_L152RE-ARM | NUCLEO_L152RE | tests-mbed_drivers-flashiap | OK     | 59.48              | shell       |
| NUCLEO_L152RE-ARM | NUCLEO_L152RE | tests-mbed_hal-flash        | OK     | 56.14              | shell       |
+-------------------+---------------+-----------------------------+--------+--------------------+-------------+
  • L4
+-------------------+---------------+-----------------------------+--------+--------------------+-------------+
| target            | platform_name | test suite                  | result | elapsed_time (sec) | copy_method |
+-------------------+---------------+-----------------------------+--------+--------------------+-------------+
| DISCO_L476VG-ARM  | DISCO_L476VG  | tests-mbed_drivers-flashiap | OK     | 88.25              | shell       |
| DISCO_L476VG-ARM  | DISCO_L476VG  | tests-mbed_hal-flash        | OK     | 89.7               | shell       |
| NUCLEO_L432KC-ARM | NUCLEO_L432KC | tests-mbed_drivers-flashiap | OK     | 88.64              | shell       |
| NUCLEO_L432KC-ARM | NUCLEO_L432KC | tests-mbed_hal-flash        | OK     | 89.81              | shell       |
| NUCLEO_L476RG-ARM | NUCLEO_L476RG | tests-mbed_drivers-flashiap | OK     | 88.22              | shell       |
| NUCLEO_L476RG-ARM | NUCLEO_L476RG | tests-mbed_hal-flash        | OK     | 91.76              | shell       |
+-------------------+---------------+-----------------------------+--------+--------------------+-------------+
  • F7
+-------------------+---------------+-----------------------------+--------+--------------------+-------------+
| target            | platform_name | test suite                  | result | elapsed_time (sec) | copy_method |
+-------------------+---------------+-----------------------------+--------+--------------------+-------------+
| DISCO_F746NG-ARM  | DISCO_F746NG  | tests-mbed_drivers-flashiap | OK     | 86.8               | shell       |
| DISCO_F746NG-ARM  | DISCO_F746NG  | tests-mbed_hal-flash        | OK     | 84.71              | shell       |
| DISCO_F769NI-ARM  | DISCO_F769NI  | tests-mbed_drivers-flashiap | OK     | 87.89              | shell       |
| DISCO_F769NI-ARM  | DISCO_F769NI  | tests-mbed_hal-flash        | OK     | 85.29              | shell       |
| NUCLEO_F746ZG-ARM | NUCLEO_F746ZG | tests-mbed_drivers-flashiap | OK     | 87.58              | shell       |
| NUCLEO_F746ZG-ARM | NUCLEO_F746ZG | tests-mbed_hal-flash        | OK     | 85.19              | shell       |
| NUCLEO_F756ZG-ARM | NUCLEO_F756ZG | tests-mbed_drivers-flashiap | OK     | 87.13              | shell       |
| NUCLEO_F756ZG-ARM | NUCLEO_F756ZG | tests-mbed_hal-flash        | OK     | 85.64              | shell       |
| NUCLEO_F767ZI-ARM | NUCLEO_F767ZI | tests-mbed_drivers-flashiap | OK     | 86.89              | shell       |
| NUCLEO_F767ZI-ARM | NUCLEO_F767ZI | tests-mbed_hal-flash        | OK     | 84.49              | shell       |
+-------------------+---------------+-----------------------------+--------+--------------------+-------------+
  • F4
+-------------------+---------------+-----------------------------+--------+--------------------+-------------+
| target            | platform_name | test suite                  | result | elapsed_time (sec) | copy_method |
+-------------------+---------------+-----------------------------+--------+--------------------+-------------+
| DISCO_F413ZH-ARM  | DISCO_F413ZH  | tests-mbed_drivers-flashiap | OK     | 26.99              | shell       |
| DISCO_F413ZH-ARM  | DISCO_F413ZH  | tests-mbed_hal-flash        | OK     | 26.72              | shell       |
| DISCO_F429ZI-ARM  | DISCO_F429ZI  | tests-mbed_drivers-flashiap | OK     | 26.61              | shell       |
| DISCO_F429ZI-ARM  | DISCO_F429ZI  | tests-mbed_hal-flash        | OK     | 26.58              | shell       |
| DISCO_F469NI-ARM  | DISCO_F469NI  | tests-mbed_drivers-flashiap | OK     | 25.93              | shell       |
| DISCO_F469NI-ARM  | DISCO_F469NI  | tests-mbed_hal-flash        | OK     | 26.36              | shell       |
| NUCLEO_F401RE-ARM | NUCLEO_F401RE | tests-mbed_drivers-flashiap | OK     | 27.19              | shell       |
| NUCLEO_F401RE-ARM | NUCLEO_F401RE | tests-mbed_hal-flash        | OK     | 26.13              | shell       |
| NUCLEO_F410RB-ARM | NUCLEO_F410RB | tests-mbed_drivers-flashiap | OK     | 24.56              | shell       |
| NUCLEO_F410RB-ARM | NUCLEO_F410RB | tests-mbed_hal-flash        | OK     | 24.79              | shell       |
| NUCLEO_F411RE-ARM | NUCLEO_F411RE | tests-mbed_drivers-flashiap | OK     | 26.43              | shell       |
| NUCLEO_F411RE-ARM | NUCLEO_F411RE | tests-mbed_hal-flash        | OK     | 26.24              | shell       |
| NUCLEO_F412ZG-ARM | NUCLEO_F412ZG | tests-mbed_drivers-flashiap | OK     | 27.16              | shell       |
| NUCLEO_F412ZG-ARM | NUCLEO_F412ZG | tests-mbed_hal-flash        | OK     | 26.68              | shell       |
| NUCLEO_F429ZI-ARM | NUCLEO_F429ZI | tests-mbed_drivers-flashiap | OK     | 26.49              | shell       |
| NUCLEO_F429ZI-ARM | NUCLEO_F429ZI | tests-mbed_hal-flash        | OK     | 26.85              | shell       |
| NUCLEO_F439ZI-ARM | NUCLEO_F439ZI | tests-mbed_drivers-flashiap | OK     | 26.47              | shell       |
| NUCLEO_F439ZI-ARM | NUCLEO_F439ZI | tests-mbed_hal-flash        | OK     | 26.63              | shell       |
| NUCLEO_F446ZE-ARM | NUCLEO_F446ZE | tests-mbed_drivers-flashiap | OK     | 26.75              | shell       |
| NUCLEO_F446ZE-ARM | NUCLEO_F446ZE | tests-mbed_hal-flash        | OK     | 27.05              | shell       |
+-------------------+---------------+-----------------------------+--------+--------------------+-------------+
STM32: Lock / Unlock flash for each operation
Rather than Unlocking flash during flash object creation, and leaving
the flash possibly continuously unlocked a(s object might bever be freed),
we decide to Unlock then Lock again at each erase or program call.
@LMESTM

This comment has been minimized.

Contributor

LMESTM commented Sep 6, 2017

@theotherjimmy Testing complete so "needs:work" label can be updated I think.
Is there a real build error in CI ? I can't get the details

@0xc0170

This comment has been minimized.

Member

0xc0170 commented Sep 6, 2017

I restarted the build, the result there looked suspicios (not related to this changeset).

I'll label this as needs: CI soon, reviewing.

@0xc0170

0xc0170 approved these changes Sep 6, 2017

LGTM

Is there any latency now expected (how long it takes to lock/unlock flash) ?

@0xc0170 0xc0170 added needs: CI and removed needs: work labels Sep 6, 2017

@LMESTM

This comment has been minimized.

Contributor

LMESTM commented Sep 6, 2017

@0xc0170 THX. Added latency should be transparent compared to program / erase operations. The lock/unlock prevents or allows writing to the Configuration Registers, not on the flash itself. (Well yes indirectly it prevents access to the flash ... hope I'm clear enough )

@LMESTM

This comment has been minimized.

Contributor

LMESTM commented Sep 13, 2017

@0xc0170 when is CI planned ?

@0xc0170

This comment has been minimized.

Member

0xc0170 commented Sep 21, 2017

@0xc0170 when is CI planned ?

We can't timebox this as our minor and patch release are due soon (CI pipeline is being occupied most of the time, as we are adding also some older jobs, so this will get in there also).

@theotherjimmy

This comment has been minimized.

Contributor

theotherjimmy commented Sep 21, 2017

/morph test

@mbed-bot

This comment has been minimized.

mbed-bot commented Sep 22, 2017

Result: ABORTED

Your command has finished executing! Here's what you wrote!

/morph test

Output

mbed Build Number: 1364

Build Prep failed!

@0xc0170

This comment has been minimized.

Member

0xc0170 commented Sep 26, 2017

/morph test

@mbed-bot

This comment has been minimized.

mbed-bot commented Sep 26, 2017

Result: SUCCESS

Your command has finished executing! Here's what you wrote!

/morph test

Output

mbed Build Number: 1391

All builds and test passed!

@0xc0170

This comment has been minimized.

Member

0xc0170 commented Sep 27, 2017

/morph test-nightly

@mbed-bot

This comment has been minimized.

mbed-bot commented Sep 27, 2017

Result: SUCCESS

Your command has finished executing! Here's what you wrote!

/morph test-nightly

Output

mbed Build Number: 1400

All builds and test passed!

@theotherjimmy theotherjimmy merged commit 6cb0258 into ARMmbed:master Sep 27, 2017

5 checks passed

Cam-CI uvisor Build & Test Success
Details
ci/morph-test Job has completed
Details
ci/morph-test-nightly Job has completed
Details
continuous-integration/jenkins/pr-head This commit looks good
Details
continuous-integration/travis-ci/pr The Travis CI build passed
Details
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment