From fba79be3b47738bdc8866a86c027765f1ab99a87 Mon Sep 17 00:00:00 2001 From: Uwe Bonnes Date: Sun, 18 Dec 2011 15:03:51 +0100 Subject: [PATCH] Page erase for STM32L needs a real write to lowest address with 0. stink_write_mem(.., ..,0) is undedined --- src/stlink-common.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/stlink-common.c b/src/stlink-common.c index bec79c3..f89159a 100644 --- a/src/stlink-common.c +++ b/src/stlink-common.c @@ -970,7 +970,7 @@ int stlink_erase_flash_page(stlink_t *sl, stm32_addr_t flashaddr) #endif /* fix_to_be_confirmed */ /* write 0 to the first word of the page to be erased */ - stlink_write_mem32(sl, flashaddr, 0); + stlink_write_debug32(sl, flashaddr, 0); /* MP: It is better to wait for clearing the busy bit after issuing page erase command, even though PM0062 recommends to wait before it.