This is an automated email from Gerrit. Uwe Bonnes ([email protected]) just uploaded a new patch set to Gerrit, which you can find at http://openocd.zylin.com/3374
-- gerrit commit 6212823bb74532c63d3f5e37b0cd6934a7eff482 Author: Uwe Bonnes <[email protected]> Date: Wed Mar 2 13:17:04 2016 +0100 src/flash/nor/stm32f2x.c: Really erase second bank if requested. Taken from git://git.ac6.fr/openocd commit e8ed67c42227b7072 Change-Id: Ic7f529aecd1603b8c083c3c9ce96a0f13dd604e0 Signed-off-by: Uwe Bonnes <[email protected]> diff --git a/src/flash/nor/stm32f2x.c b/src/flash/nor/stm32f2x.c index 606c0a7..afa95d8 100644 --- a/src/flash/nor/stm32f2x.c +++ b/src/flash/nor/stm32f2x.c @@ -1114,6 +1114,7 @@ COMMAND_HANDLER(stm32x_handle_unlock_command) static int stm32x_mass_erase(struct flash_bank *bank) { int retval; + int flash_mer; struct target *target = bank->target; struct stm32x_flash_bank *stm32x_info = NULL; @@ -1130,13 +1131,14 @@ static int stm32x_mass_erase(struct flash_bank *bank) /* mass erase flash memory */ if (stm32x_info->has_large_mem) - retval = target_write_u32(target, stm32x_get_flash_reg(bank, STM32_FLASH_CR), FLASH_MER | FLASH_MER1); + flash_mer = FLASH_MER | FLASH_MER1; else - retval = target_write_u32(target, stm32x_get_flash_reg(bank, STM32_FLASH_CR), FLASH_MER); + flash_mer = FLASH_MER; + retval = target_write_u32(target, stm32x_get_flash_reg(bank, STM32_FLASH_CR), flash_mer); if (retval != ERROR_OK) return retval; retval = target_write_u32(target, stm32x_get_flash_reg(bank, STM32_FLASH_CR), - FLASH_MER | FLASH_STRT); + flash_mer | FLASH_STRT); if (retval != ERROR_OK) return retval; -- ------------------------------------------------------------------------------ Site24x7 APM Insight: Get Deep Visibility into Application Performance APM + Mobile APM + RUM: Monitor 3 App instances at just $35/Month Monitor end-to-end web transactions and take corrective actions now Troubleshoot faster and improve end-user experience. Signup Now! http://pubads.g.doubleclick.net/gampad/clk?id=272487151&iu=/4140 _______________________________________________ OpenOCD-devel mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/openocd-devel
