-
Notifications
You must be signed in to change notification settings - Fork 31
Open
Description
In microbitfs.c there's a single call to copy_page() with a preceeding called to flash_page_erase().
micropython-microbit-v2/src/codal_port/microbitfs.c
Lines 235 to 240 in 7c304ec
| while (page != end_page) { | |
| uint8_t *next_page = page+step; | |
| flash_page_erase((uint32_t)page); | |
| copy_page(page, next_page); | |
| page = next_page; | |
| } |
Inside copy_page() it also calls flash_page_erase() on first arg.
micropython-microbit-v2/src/codal_port/microbitfs.c
Lines 194 to 196 in 7c304ec
| static void copy_page(void *dest, void *src) { | |
| DEBUG(("FILE DEBUG: Copying page from %lx to %lx.\r\n", (uint32_t)src, (uint32_t)dest)); | |
| flash_page_erase((uint32_t)dest); |
Unless there's some magic under the covers I think this will be causing unnecessary wear on the flash? And maybe slowing things down a tiny bit?
Metadata
Metadata
Assignees
Labels
No labels