From 0900d5a3cd956d9a5aa6b4ecfe722bcce4831f32 Mon Sep 17 00:00:00 2001 From: Andreas Fritiofson Date: Wed, 11 Jul 2012 16:23:48 +0200 Subject: flash: don't write to FLASH_CR in stm32x_write_block It's unnecessary and prevents reusing this function to fix option byte writes. Also try to disable flash writing after an error. Change-Id: Ib5a7b768a1523e6b8da1555126fef4c1e60ab083 Signed-off-by: Szymon Modzelewski Signed-off-by: Andreas Fritiofson Reviewed-on: http://openocd.zylin.com/479 Tested-by: jenkins Reviewed-by: Spencer Oliver --- contrib/loaders/flash/stm32f1x.S | 3 --- 1 file changed, 3 deletions(-) (limited to 'contrib/loaders') diff --git a/contrib/loaders/flash/stm32f1x.S b/contrib/loaders/flash/stm32f1x.S index e83d8c1..6b6aa09 100644 --- a/contrib/loaders/flash/stm32f1x.S +++ b/contrib/loaders/flash/stm32f1x.S @@ -37,7 +37,6 @@ * r7 - tmp */ -#define STM32_FLASH_CR_OFFSET 0x10 /* offset of CR register from flash reg base */ #define STM32_FLASH_SR_OFFSET 0x0c /* offset of SR register from flash reg base */ wait_fifo: @@ -47,8 +46,6 @@ wait_fifo: ldr r5, [r2, #4] /* read rp */ cmp r5, r6 /* wait until rp != wp */ beq wait_fifo - movs r6, #1 /* set PG flag to enable flash programming */ - str r6, [r0, #STM32_FLASH_CR_OFFSET] ldrh r6, [r5] /* "*target_address++ = *rp++" */ strh r6, [r4] adds r5, #2 -- cgit v1.1