flash bank $_FLASHNAME stm32f1x 0 0 0 0 $_TARGETNAME
@end example
+Note that some devices have been found that have a flash size register that contains
+an invalid value, to workaround this issue you can override the probed value used by
+the flash driver.
+
+@example
+flash bank $_FLASHNAME stm32f1x 0 0x20000 0 0 $_TARGETNAME
+@end example
+
If you have a target with dual flash banks then define the second bank
as per the following example.
@example
The driver automatically recognizes a number of these chips using
the chip identification register, and autoconfigures itself.
+Note that some devices have been found that have a flash size register that contains
+an invalid value, to workaround this issue you can override the probed value used by
+the flash driver.
+
+@example
+flash bank $_FLASHNAME stm32f2x 0 0x20000 0 0 $_TARGETNAME
+@end example
+
Some stm32f2x-specific commands are defined:
@deffn Command {stm32f2x lock} num
@end deffn
@end deffn
+@deffn {Flash Driver} stm32lx
+All members of the STM32L microcontroller families from ST Microelectronics
+include internal flash and use ARM Cortex-M3 cores.
+The driver automatically recognizes a number of these chips using
+the chip identification register, and autoconfigures itself.
+
+Note that some devices have been found that have a flash size register that contains
+an invalid value, to workaround this issue you can override the probed value used by
+the flash driver.
+
+@example
+flash bank $_FLASHNAME stm32lx 0 0x20000 0 0 $_TARGETNAME
+@end example
+@end deffn
+
@deffn {Flash Driver} str7x
All members of the STR7 microcontroller family from ST Microelectronics
include internal flash and use ARM7TDMI cores.
}
}
+ /* 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? */
flash_size_in_kb = max_flash_size_in_kb;
}
+ /* 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? */
flash_size_in_kb = max_flash_size_in_kb;
}
+ /* 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;
+ }
+
/* STM32L - we have 32 sectors, 16 pages per sector -> 512 pages
* 16 pages for a protection area */