diff options
author | Spencer Oliver <ntfreak@users.sourceforge.net> | 2010-12-22 17:18:14 +0000 |
---|---|---|
committer | Spencer Oliver <ntfreak@users.sourceforge.net> | 2010-12-23 12:11:13 +0000 |
commit | 83e5aaf577ef86c767f22044e1a8dcc4d136597f (patch) | |
tree | 12c1a1a8b1c3ac28c4c1161a1a197feedb30f4bd /contrib | |
parent | 921f40f62a76426294ad2841a8b5da8b919bf10f (diff) | |
download | openocd_libswd-83e5aaf577ef86c767f22044e1a8dcc4d136597f.tar.gz openocd_libswd-83e5aaf577ef86c767f22044e1a8dcc4d136597f.tar.bz2 openocd_libswd-83e5aaf577ef86c767f22044e1a8dcc4d136597f.tar.xz openocd_libswd-83e5aaf577ef86c767f22044e1a8dcc4d136597f.zip |
stm32: add dual flash bank support
This patch adds the initial dual flash bank support for devices such
as the stm32xl family.
Signed-off-by: Spencer Oliver <ntfreak@users.sourceforge.net>
Diffstat (limited to 'contrib')
-rw-r--r-- | contrib/loaders/flash/stm32x.S | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/contrib/loaders/flash/stm32x.S b/contrib/loaders/flash/stm32x.S index 7269e799..01494b86 100644 --- a/contrib/loaders/flash/stm32x.S +++ b/contrib/loaders/flash/stm32x.S @@ -29,8 +29,8 @@ r0 - source address r1 - target address r2 - count (halfword-16bit) - r3 - result - r4 - temp + r3 - sector offet in : result out + r4 - flash base */ #define STM32_FLASH_CR_OFFSET 0x10 /* offset of CR register in FLASH struct */ @@ -38,6 +38,7 @@ write: ldr r4, STM32_FLASH_BASE + add r4, r3 /* add offset 0x00 for sector 0 : 0x40 for sector 1 */ write_half_word: movs r3, #0x01 str r3, [r4, #STM32_FLASH_CR_OFFSET] /* PG (bit0) == 1 => flash programming enabled */ |