projects
/
fw
/
stlink
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
094fe67
)
clean SR flags before programming CR
author
Bruno Dal Bo
<bruno.dalbo@hp.com>
Wed, 3 Feb 2016 21:10:54 +0000
(13:10 -0800)
committer
Bruno Dal Bo
<bruno.dalbo@hp.com>
Wed, 3 Feb 2016 21:10:54 +0000
(13:10 -0800)
src/stlink-common.c
patch
|
blob
|
history
diff --git
a/src/stlink-common.c
b/src/stlink-common.c
index f2888d10b4a1ad1b072d83e96e39b7a6915dd66d..04e616762fe0ce901f623bc4cc3ca5d0ae7d5405 100644
(file)
--- a/
src/stlink-common.c
+++ b/
src/stlink-common.c
@@
-432,6
+432,7
@@
static inline void write_flash_cr_snb(stlink_t *sl, uint32_t n) {
}
static inline void write_flash_cr_bker_pnb(stlink_t *sl, uint32_t n) {
+ stlink_write_debug32(sl, STM32L4_FLASH_SR, 0xFFFFFFFF & ~(1<<STM32L4_FLASH_SR_BSY));
uint32_t x = read_flash_cr(sl);
x &=~ STM32L4_FLASH_CR_OPBITS;
x &=~ STM32L4_FLASH_CR_PAGEMASK;