Skip to content

Commit

Permalink
Merge pull request #876 from nerdmaennchen/master
Browse files Browse the repository at this point in the history
clear the PG bit before setting the PER bit
  • Loading branch information
Nightwalker-87 committed Mar 19, 2020
2 parents 52e5a69 + 268313b commit 2ae73e4
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions src/common.c
Original file line number Diff line number Diff line change
Expand Up @@ -1893,6 +1893,9 @@ int stlink_erase_flash_page(stlink_t *sl, stm32_addr_t flashaddr)
/* unlock if locked */
unlock_flash_if(sl);

/* clear the pg bit */
clear_flash_cr_pg(sl);

/* set the page erase bit */
set_flash_cr_per(sl);

Expand Down

0 comments on commit 2ae73e4

Please sign in to comment.