From e406f2b0dce0b7c6974ca715700f445e2580a36d Mon Sep 17 00:00:00 2001 From: Andreas Kemnade Date: Sun, 4 Mar 2018 09:07:23 +0100 Subject: [PATCH] efm32: correct erase address if bank->base != 0 Prepare for additional flash banks not located at address 0 Change-Id: I60b78c917f94fa52bf24df9e3315536f776eec84 Signed-off-by: Andreas Kemnade Reviewed-on: http://openocd.zylin.com/4440 Tested-by: jenkins Reviewed-by: Tomas Vanek --- src/flash/nor/efm32.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/flash/nor/efm32.c b/src/flash/nor/efm32.c index 1d70bd50..8ff689cc 100644 --- a/src/flash/nor/efm32.c +++ b/src/flash/nor/efm32.c @@ -429,7 +429,7 @@ static int efm32x_erase_page(struct flash_bank *bank, uint32_t addr) */ int ret = 0; uint32_t status = 0; - + addr += bank->base; LOG_DEBUG("erasing flash page at 0x%08" PRIx32, addr); ret = efm32x_write_reg_u32(bank, EFM32_MSC_REG_ADDRB, addr); -- 2.39.5