From: ntfreak Date: Wed, 11 Jun 2008 11:12:24 +0000 (+0000) Subject: - probe incorrect for high density stm32 flash X-Git-Tag: v0.1.0~581 X-Git-Url: https://git.sur5r.net/?a=commitdiff_plain;h=5c8ebfbed2315959f95ef96f358c5611fe398719;p=openocd - probe incorrect for high density stm32 flash git-svn-id: svn://svn.berlios.de/openocd/trunk@708 b42882b7-edfa-0310-969c-e2dbd0fdcd60 --- diff --git a/src/flash/stm32x.c b/src/flash/stm32x.c index 5e1db209..ae5701a2 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);