F1 set_flash_cr_strt unconditionally set the PER bit and so mass erase didn't work

pull/52/head
Uwe Bonnes 2012-01-20 17:25:01 +01:00
rodzic 31d4134919
commit d00a6a30a2
1 zmienionych plików z 3 dodań i 3 usunięć

Wyświetl plik

@ -246,9 +246,9 @@ static void set_flash_cr_strt(stlink_t *sl) {
stlink_write_debug32(sl, FLASH_F4_CR, x);
}
else {
/* assume come on the flash_cr_per path */
const uint32_t n = (1 << FLASH_CR_PER) | (1 << FLASH_CR_STRT);
stlink_write_debug32(sl, FLASH_CR, n);
stlink_write_debug32(
sl, FLASH_CR,
stlink_read_debug32(sl,FLASH_CR) |(1 << FLASH_CR_STRT) );
}
}