libDaisy icon indicating copy to clipboard operation
libDaisy copied to clipboard

qspi erase optimization

Open eh2k opened this issue 2 years ago • 1 comments

Hello,

Erasing larger memory areas takes a long time, because in the current implementation only single 4kb sectors are erased in a loop.

In this pull request, depending on the erasing memory range, either the previous SECTOR_ERASE_CMD (4kb) or the much faster BLOCK_ERASE_CMD (64kb) instruction is used. See QSPIHandle::Impl::Erase...

The issue was also discussed here https://forum.electro-smith.com/t/external-flash-erase-speed/1268/6.

eh2k

eh2k avatar Mar 25 '23 19:03 eh2k

Hi @eh2k thanks for the PR!

This is definitely a useful update! At a glance it looks good. We'll do some testing this week and get you feedback, or merge it!

stephenhensley avatar Mar 27 '23 14:03 stephenhensley

closing this PR .... i think i forgotten the PR is still open, and have pushed some time ago other things to master branch.

eh2k avatar Nov 01 '25 13:11 eh2k