Skip to content

Commit

Permalink
SAM E51: hal_flash_erase bugfix
Browse files Browse the repository at this point in the history
Increment the address when erasing multiple pages.
  • Loading branch information
danielinux committed Feb 29, 2024
1 parent c2388cd commit 32057f1
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions hal/same51.c
Original file line number Diff line number Diff line change
Expand Up @@ -391,6 +391,7 @@ int RAMFUNCTION hal_flash_erase(uint32_t address, int len)
while(!(NVMCTRL_INTFLAG & NVMCTRL_INTFLAG_CMD_DONE))
;
len -= WOLFBOOT_SECTOR_SIZE;
address += WOLFBOOT_SECTOR_SIZE;
}
return 0;
}
Expand Down

0 comments on commit 32057f1

Please sign in to comment.