aboutsummaryrefslogtreecommitdiff
path: root/src/flash/stm32x.c
diff options
context:
space:
mode:
authorntfreak <ntfreak@b42882b7-edfa-0310-969c-e2dbd0fdcd60>2008-06-11 11:12:24 +0000
committerntfreak <ntfreak@b42882b7-edfa-0310-969c-e2dbd0fdcd60>2008-06-11 11:12:24 +0000
commit5c8ebfbed2315959f95ef96f358c5611fe398719 (patch)
treeacc1c52e9a741ffef50b2a197e304503105fd011 /src/flash/stm32x.c
parent710c1a9ed92d188c8edad20917642d951c0158f9 (diff)
downloadriscv-openocd-5c8ebfbed2315959f95ef96f358c5611fe398719.zip
riscv-openocd-5c8ebfbed2315959f95ef96f358c5611fe398719.tar.gz
riscv-openocd-5c8ebfbed2315959f95ef96f358c5611fe398719.tar.bz2
- probe incorrect for high density stm32 flash
git-svn-id: svn://svn.berlios.de/openocd/trunk@708 b42882b7-edfa-0310-969c-e2dbd0fdcd60
Diffstat (limited to 'src/flash/stm32x.c')
-rw-r--r--src/flash/stm32x.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/src/flash/stm32x.c b/src/flash/stm32x.c
index 5e1db20..ae5701a 100644
--- a/src/flash/stm32x.c
+++ b/src/flash/stm32x.c
@@ -670,8 +670,7 @@ int stm32x_probe(struct flash_bank_s *bank)
LOG_INFO( "flash size = %dkbytes", num_pages );
/* calculate numbers of pages */
- if (page_size - 1024)
- num_pages /= (page_size - 1024);
+ num_pages /= (page_size / 1024);
bank->base = 0x08000000;
bank->size = (num_pages * page_size);