From 094fe67773541cd4547a4dbf4804f51b4293597e Mon Sep 17 00:00:00 2001 From: Bruno Dal Bo Date: Wed, 3 Feb 2016 13:06:18 -0800 Subject: [PATCH] fix on stm32l4 to clear flash mass erase flags on CR --- src/stlink-common.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/stlink-common.c b/src/stlink-common.c index 4ad28ee..f2888d1 100644 --- a/src/stlink-common.c +++ b/src/stlink-common.c @@ -435,6 +435,8 @@ static inline void write_flash_cr_bker_pnb(stlink_t *sl, uint32_t n) { uint32_t x = read_flash_cr(sl); x &=~ STM32L4_FLASH_CR_OPBITS; x &=~ STM32L4_FLASH_CR_PAGEMASK; + x &= ~(1<