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

Feature: Flash IAP c++ class addition #3732

Closed
wants to merge 10 commits into from

Conversation

c1728p9
Copy link
Contributor

@c1728p9 c1728p9 commented Feb 9, 2017

Description - rebased copy of #3700

FlashIAP class addition. It provides block device alike API (write/read/program) plus some getters that are useful for applications.

I added a functional test that was tested with k64f, more to come.

+----------+---------------+-----------------------------+--------+--------------------+-------------+
| target   | platform_name | test suite                  | result | elapsed_time (sec) | copy_method |
+----------+---------------+-----------------------------+--------+--------------------+-------------+
| K64F-ARM | K64F          | tests-mbed_drivers-flashiap | OK     | 13.08              | shell       |
+----------+---------------+-----------------------------+--------+--------------------+-------------+
mbedgt: test suite results: 1 OK
mbedgt: test case report:
+----------+---------------+-----------------------------+--------------------+--------+--------+--------+--------------------+
| target   | platform_name | test suite                  | test case          | passed | failed | result | elapsed_time (sec) |
+----------+---------------+-----------------------------+--------------------+--------+--------+--------+--------------------+
| K64F-ARM | K64F          | tests-mbed_drivers-flashiap | FlashIAP - init    | 1      | 0      | OK     | 0.05               |
| K64F-ARM | K64F          | tests-mbed_drivers-flashiap | FlashIAP - program | 1      | 0      | OK     | 0.1                |
| K64F-ARM | K64F          | tests-mbed_drivers-flashiap | FlashIAP - write   | 1      | 0      | OK     | 0.1                |
+----------+---------------+-----------------------------+--------------------+--------+--------+--------+--------------------+
mbedgt: test case results: 3 OK

Status

READY

This PR is for feature branch feature-flash-api

cc @c1728p9 @geky

4 functions that are covered - init, free, program_page and erase_sector.
K64F and KL46Z addition to use this common layer. This implementation uses flash algo blob
that are generated via scripts.

If target supports flash algo, it can get common HAL implementation, providing
feature "HAL_FLASH_CMSIS_ALGO". This simplifies target code, and having one implementation that can be
shared by many targets.

Be careful with flash cmsis algo, in some cases they execute code that can affect the system. For instance,
it can disable cache, or affect some system clocks. Therefore this feature should be well tested.
flash api should include this header file, as it contains required data declarations.
Flash IAP that provides write/read/program to an internal API. It invokes
flash HAL functions.

FlashIAP checks for alignments for erase/write/program. HAL functions do not, to avoid
duplication per target implementation.
It currently tests functionality provided by flash IAP API like
write/read/program/erase and getters.
Plus fixes in the tests to get properly end of flash (start + size)
@c1728p9 c1728p9 closed this Feb 9, 2017
@SanaMasood SanaMasood mentioned this pull request May 16, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants