Skip to content

Commit 32057f1

Browse files
committed
SAM E51: hal_flash_erase bugfix
Increment the address when erasing multiple pages.
1 parent c2388cd commit 32057f1

1 file changed

Lines changed: 1 addition & 0 deletions

File tree

hal/same51.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -391,6 +391,7 @@ int RAMFUNCTION hal_flash_erase(uint32_t address, int len)
391391
while(!(NVMCTRL_INTFLAG & NVMCTRL_INTFLAG_CMD_DONE))
392392
;
393393
len -= WOLFBOOT_SECTOR_SIZE;
394+
address += WOLFBOOT_SECTOR_SIZE;
394395
}
395396
return 0;
396397
}

0 commit comments

Comments
 (0)