kopia lustrzana https://github.com/stlink-org/stlink
Fix apparent STM32G0 flashing issue. (#797)
* Add simple read/write support for STM32WB55 chips. * Clean up and unify G0/WB erase/program operations. * Fix apparent issue with STM32G0 flashing.pull/802/head
rodzic
feb86618fa
commit
cf677803d0
|
@ -1766,7 +1766,7 @@ int stlink_erase_flash_page(stlink_t *sl, stm32_addr_t flashaddr)
|
|||
uint32_t flash_page = ((flashaddr - STM32_FLASH_BASE) / sl->flash_pgsz);
|
||||
stlink_read_debug32(sl, STM32G0_FLASH_CR, &val);
|
||||
// sec 3.7.5 - PNB[5:0] is offset by 3. PER is 0x2.
|
||||
val |= ((flash_page & 0x3F) << 3);
|
||||
val = ((flash_page & 0x3F) << 3) | ( 1 << FLASH_CR_PER );
|
||||
stlink_write_debug32(sl, STM32G0_FLASH_CR, val);
|
||||
}
|
||||
|
||||
|
|
Ładowanie…
Reference in New Issue