diff --git a/flashstub/stm32f4.c b/flashstub/stm32f4.c index 6732897..1af271a 100644 --- a/flashstub/stm32f4.c +++ b/flashstub/stm32f4.c @@ -28,6 +28,7 @@ stm32f4_flash_write_stub(uint32_t *dest, uint32_t *src, uint32_t size) for (int i = 0; i < size; i += 4) { FLASH_CR = FLASH_CR_PROGRAM_X32 | FLASH_CR_PG; *dest++ = *src++; + __asm("dsb"); while (FLASH_SR & FLASH_SR_BSY) ; } diff --git a/flashstub/stm32f4.stub b/flashstub/stm32f4.stub index bd20406..b8fc412 100644 --- a/flashstub/stm32f4.stub +++ b/flashstub/stm32f4.stub @@ -1 +1 @@ -0x2300, 0x4C09, 0x4293, 0xD209, 0x4D08, 0x4E09, 0x602E, 0x58CD, 0x50C5, 0x6825, 0x03ED, 0xD4FC, 0x3304, 0xE7F2, 0x23F2, 0x6822, 0x421A, 0xD000, 0xBE01, 0xBE00, 0x3C0C, 0x4002, 0x3C10, 0x4002, 0x0201, 0x0000, \ No newline at end of file +0x2300, 0x4C0A, 0x4293, 0xD20B, 0x4E09, 0x4D0A, 0x602E, 0x58CD, 0x50C5, 0xF3BF, 0x8F4F, 0x6825, 0x03ED, 0xD4FC, 0x3304, 0xE7F0, 0x23F2, 0x6822, 0x421A, 0xD000, 0xBE01, 0xBE00, 0x3C0C, 0x4002, 0x0201, 0x0000, 0x3C10, 0x4002, \ No newline at end of file