SAM E51: hal_flash_erase bugfix

Increment the address when erasing multiple pages.
pull/413/head
Daniele Lacamera 2024-02-29 12:30:13 +01:00
parent c2388cd142
commit 32057f1fa0
1 changed files with 1 additions and 0 deletions

View File

@ -391,6 +391,7 @@ int RAMFUNCTION hal_flash_erase(uint32_t address, int len)
while(!(NVMCTRL_INTFLAG & NVMCTRL_INTFLAG_CMD_DONE)) while(!(NVMCTRL_INTFLAG & NVMCTRL_INTFLAG_CMD_DONE))
; ;
len -= WOLFBOOT_SECTOR_SIZE; len -= WOLFBOOT_SECTOR_SIZE;
address += WOLFBOOT_SECTOR_SIZE;
} }
return 0; return 0;
} }