Skip to content

FlashIAP: Get erase value from HAL instead of hardcoding it #11752

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

Merged
merged 1 commit into from
Oct 28, 2019
Merged

FlashIAP: Get erase value from HAL instead of hardcoding it #11752

merged 1 commit into from
Oct 28, 2019

Conversation

mnaberez
Copy link
Contributor

Description (required)

Summary of change (What the change is for and why)

When programming flash, if the chunk size to program is less than the page size, the buffer is padded with the erase value. The erase value is hardcoded as 0xFF. However, since #8589, the HAL provides a flash_get_erase_value() function.

This PR replaces the hardcoded 0xFF with the value returned by flash_get_erase_value(). That value will be 0xFF for all existing targets. Removing the hardcoded assumption of 0xFF allows for MBed to support a target with a different erase value, which is the spirit of #8589.

Documentation (Details of any document updates required)

None.


Pull request type (required)

[x] Patch update (Bug fix / Target update / Docs update / Test update / Refactor)
[] Feature update (New feature / Functionality change / New API)
[] Major update (Breaking change E.g. Return code change / API behaviour change)

Test results (required)

[] No Tests required for this change (E.g docs only update)
[x] Covered by existing mbed-os tests (Greentea or Unittest)
[] Tests / results supplied as part of this PR

@ciarmcom ciarmcom requested review from a team October 26, 2019 23:00
@ciarmcom
Copy link
Member

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

@0xc0170 0xc0170 removed the request for review from a team October 28, 2019 08:22
@0xc0170
Copy link
Contributor

0xc0170 commented Oct 28, 2019

CI started

@mbed-ci
Copy link

mbed-ci commented Oct 28, 2019

Test run: SUCCESS

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

@0xc0170 0xc0170 merged commit 1c5fe1c into ARMmbed:master Oct 28, 2019
@mnaberez mnaberez deleted the erase-value branch October 28, 2019 15:52
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.

4 participants