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 support for partial flash erase #385

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

arturkow2000
Copy link

Partial erase is a feature that allows to reduce time CPU is halted when
using NVMC. It works by dividing page erase operation into multiple
operations, in-between each operation CPU is resumed allowing interrupt
handling.

Erasing a single page takes 85 ms on nRF52840, during write CPU can't handle interrupts,
this may result, e.g. in broken USB, especially if erase happens during enumeration.

This code has been tested on nRF52840 by zeroing page, erasing it and checking whether all bits are back to 1.

Partial erase is a feature that allows to reduce time CPU is halted when
using NVMC. It works by dividing page erase operation into multiple
operations, in-between each operation CPU is resumed allowing interrupt
handling.
Copy link

@krystian-hebel krystian-hebel left a comment

Choose a reason for hiding this comment

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

Tested on nRF52840, but must be made to work for other SoCs.

@qwandor
Copy link
Member

qwandor commented May 23, 2024

This seems like a good idea! Can you rebase it on top of the latest master? Is there any difference between different chips that we need to handle before merging this?

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.

None yet

4 participants