From: Bruno Dal Bo Date: Wed, 3 Feb 2016 21:06:18 +0000 (-0800) Subject: fix on stm32l4 to clear flash mass erase flags on CR X-Git-Url: https://git.gag.com/?a=commitdiff_plain;h=094fe67773541cd4547a4dbf4804f51b4293597e;p=fw%2Fstlink fix on stm32l4 to clear flash mass erase flags on CR --- 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<