Fix a wrong placed brace and and a not replaced stlink_write_mem32() that keep

STM32L from programming
pull/40/head
Uwe Bonnes 2011-12-18 15:21:26 +01:00
rodzic fba79be3b4
commit 5652cee37d
1 zmienionych plików z 2 dodań i 2 usunięć

Wyświetl plik

@ -1317,10 +1317,10 @@ int stlink_write_flash(stlink_t *sl, stm32_addr_t addr, uint8_t* base, unsigned
}
write_uint32((unsigned char*) &data, *(uint32_t*) (base + off));
stlink_write_mem32(sl, addr + off, data);
stlink_write_debug32(sl, addr + off, data);
/* wait for sr.busy to be cleared */
while (stlink_read_debug32(sl, STM32L_FLASH_SR & (1 << 0)) != 0) {
while ((stlink_read_debug32(sl, STM32L_FLASH_SR) & (1 << 0)) != 0) {
}
#if 0 /* todo: check redo write operation */