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

add SPI NAND Block device driver #14397

Merged
merged 13 commits into from
Jul 26, 2021
Merged

Conversation

rogeryou
Copy link
Contributor

@rogeryou rogeryou commented Mar 9, 2021

Summary of changes

Add SPI NAND block device driver for using SPI NAND Flash like Macronix Flash MX31LF4GE4BC.

Impact of changes

Migration actions required

Documentation


Pull request type

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

Test results

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

This driver is tested on DISCO_L4R9I. The flash on this board is MX31LF4GE4BC. You need to replace it with MX31LF4GE4BC.

target platform_name test suite test case passed failed result elapsed_time (sec)
DISCO_L4R9I-GCC_ARM DISCO_L4R9I storage-blockdevice-tests-tests-blockdevice-general_block_device DEFAULT Testing get type functionality 1 0 OK 0.1
DISCO_L4R9I-GCC_ARM DISCO_L4R9I storage-blockdevice-tests-tests-blockdevice-general_block_device OSPIF Testing BlockDevice erase functionality 1 0 OK 0.45
DISCO_L4R9I-GCC_ARM DISCO_L4R9I storage-blockdevice-tests-tests-blockdevice-general_block_device OSPIF Testing Deinit block device 1 0 OK 0.09
DISCO_L4R9I-GCC_ARM DISCO_L4R9I storage-blockdevice-tests-tests-blockdevice-general_block_device OSPIF Testing Init block device 1 0 OK 0.09
DISCO_L4R9I-GCC_ARM DISCO_L4R9I storage-blockdevice-tests-tests-blockdevice-general_block_device OSPIF Testing contiguous erase, write and read 1 0 OK 0.61
DISCO_L4R9I-GCC_ARM DISCO_L4R9I storage-blockdevice-tests-tests-blockdevice-general_block_device OSPIF Testing multi threads erase program read 1 0 OK 3.45
DISCO_L4R9I-GCC_ARM DISCO_L4R9I storage-blockdevice-tests-tests-blockdevice-general_block_device OSPIF Testing program read small data sizes 1 0 OK 0.34
DISCO_L4R9I-GCC_ARM DISCO_L4R9I storage-blockdevice-tests-tests-blockdevice-general_block_device OSPIF Testing read write random blocks 1 0 OK 0.89
DISCO_L4R9I-GCC_ARM DISCO_L4R9I storage-blockdevice-tests-tests-blockdevice-general_block_device OSPIF Testing unaligned erase blocks 1 0 OK 0.13
DISCO_L4R9I-GCC_ARM DISCO_L4R9I storage-blockdevice-tests-tests-blockdevice-general_block_device OSPIF Testing write -> deinit -> init -> read 1 0 OK 0.19
mbedgt: test case results: 10 OK
mbedgt: completed in 22.50 sec

Reviewers


@rogeryou rogeryou marked this pull request as ready for review March 9, 2021 07:51
@mergify mergify bot added the needs: work label Mar 9, 2021
@ciarmcom
Copy link
Member

ciarmcom commented Mar 9, 2021

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

@mergify mergify bot removed the needs: review label Mar 9, 2021
Copy link
Collaborator

@jeromecoutant jeromecoutant left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please remove targets.json patch

@@ -3832,7 +3832,7 @@
"MX25LM51245G"
],
"components_add": [
"OSPIF"
"SPINAND"
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't think default DISCO_L4R9I is supporting this.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes, default DISCO_L4R9I is not supporting this. I will remove it.
But, I modify this because I tested this driver on DISCO_L4R9I.
So far, there is not any board contained SPI NAND Flash which is supported by mbed os. I replaced the default Flash with SPI NAND Flash MX31LF4GE4BC on DISCO_L4R9I.

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

you could play with your local mbed_app.json file :-)

Copy link
Collaborator

@jeromecoutant jeromecoutant left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

OK

Modify astyle
@mergify mergify bot dismissed 0xc0170’s stale review March 15, 2021 07:35

Pull request has been modified.

@rogeryou
Copy link
Contributor Author

@0xc0170 @adbridge
Hey,
There is an error about Travis CI.
The link is #40143.4 errored
Is there anything I can do to fix this error?

@adbridge
Copy link
Contributor

@rogeryou mmm can't see why this is failing on Travis. I'll try closing and re-opening the PR and forcing a fresh run that way.

Mbed Core automation moved this from Awaiting review (3) to Reviewer approved & awaiting CI & merge (3) Jul 20, 2021
@0xc0170
Copy link
Contributor

0xc0170 commented Jul 20, 2021

@wernerlewis please rereview

@0xc0170
Copy link
Contributor

0xc0170 commented Jul 20, 2021

CI started

@mergify mergify bot added needs: CI and removed needs: review labels Jul 20, 2021
@mbed-ci
Copy link

mbed-ci commented Jul 20, 2021

Jenkins CI Test : ✔️ SUCCESS

Build Number: 1 | 🔒 Jenkins CI Job | 🌐 Logs & Artifacts

CLICK for Detailed Summary

jobs Status
jenkins-ci/mbed-os-ci_unittests ✔️
jenkins-ci/mbed-os-ci_cmake-cloud-example-ARM ✔️
jenkins-ci/mbed-os-ci_build-cloud-example-GCC_ARM ✔️
jenkins-ci/mbed-os-ci_cmake-cloud-example-GCC_ARM ✔️
jenkins-ci/mbed-os-ci_build-cloud-example-ARM ✔️
jenkins-ci/mbed-os-ci_build-greentea-ARM ✔️
jenkins-ci/mbed-os-ci_build-greentea-GCC_ARM ✔️
jenkins-ci/mbed-os-ci_cmake-example-ARM ✔️
jenkins-ci/mbed-os-ci_cmake-example-GCC_ARM ✔️
jenkins-ci/mbed-os-ci_build-example-ARM ✔️
jenkins-ci/mbed-os-ci_build-example-GCC_ARM ✔️
jenkins-ci/mbed-os-ci_greentea-test ✔️

@0xc0170 0xc0170 added needs: review and removed ready for merge stale Stale Pull Request labels Jul 20, 2021
@0xc0170
Copy link
Contributor

0xc0170 commented Jul 20, 2021

Waiting for final approvals

@ciarmcom ciarmcom added the stale Stale Pull Request label Jul 23, 2021
@ciarmcom
Copy link
Member

This pull request has automatically been marked as stale because it has had no recent activity. , please complete review of the changes to move the PR forward. Thank you for your contributions.

@ciarmcom ciarmcom added stale Stale Pull Request and removed stale Stale Pull Request labels Jul 23, 2021
@0xc0170 0xc0170 added ready for merge and removed needs: review stale Stale Pull Request labels Jul 26, 2021
@0xc0170 0xc0170 merged commit 6827b42 into ARMmbed:master Jul 26, 2021
Mbed Core automation moved this from Reviewer approved & awaiting CI & merge (3) to Done Jul 26, 2021
@mergify mergify bot removed the ready for merge label Jul 26, 2021
@Patater Patater moved this from Done to Reported in Mbed Core Jul 29, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
No open projects
Mbed Core
  
Reported
Development

Successfully merging this pull request may close these issues.

None yet

8 participants