X-Git-Url: https://review.openocd.org/gitweb?p=openocd.git;a=blobdiff_plain;f=src%2Fflash%2Fnor%2Fstm32f1x.c;h=13affcda71589ba43dbb0b68ab2aba05c14b56ea;hp=17df121b7c56802192cdde0695cd01686dfa5617;hb=bd5df8520b5d1755c8c8a86a0f64d3aa452729ca;hpb=87668aebf1851c06af2513ab5f27ebb9ebf1ff16;ds=sidebyside diff --git a/src/flash/nor/stm32f1x.c b/src/flash/nor/stm32f1x.c index 17df121b7c..13affcda71 100644 --- a/src/flash/nor/stm32f1x.c +++ b/src/flash/nor/stm32f1x.c @@ -956,6 +956,13 @@ static int stm32x_probe(struct flash_bank *bank) } } + /* if the user sets the size manually then ignore the probed value + * this allows us to work around devices that have a invalid flash size register value */ + if (bank->size) { + LOG_INFO("ignoring flash probed value, using configured bank size"); + flash_size_in_kb = bank->size / 1024; + } + LOG_INFO("flash size = %dkbytes", flash_size_in_kb); /* did we assign flash size? */