aboutsummaryrefslogtreecommitdiff
path: root/src/flash/nor/stm32f1x.c
diff options
context:
space:
mode:
authorPaul Fertser <fercerpav@gmail.com>2014-08-14 20:36:27 +0400
committerSpencer Oliver <spen@spen-soft.co.uk>2014-08-19 20:21:34 +0000
commit0c4e991b7673e81e51f7f5f6650c6b5467cac20b (patch)
treeff6877909c7bfd106d46b18605390f2fc6deb1a8 /src/flash/nor/stm32f1x.c
parent73123ccc57050bfdf84c707daa9052fc3f78efae (diff)
downloadriscv-openocd-0c4e991b7673e81e51f7f5f6650c6b5467cac20b.zip
riscv-openocd-0c4e991b7673e81e51f7f5f6650c6b5467cac20b.tar.gz
riscv-openocd-0c4e991b7673e81e51f7f5f6650c6b5467cac20b.tar.bz2
flash/nor/stm32f1x: add STM32F302x6/8 IDs, clarify STM32F302xB/C
Change-Id: I22afbe30f32b0ea9b59c3de8d15ce14bdc4763cc Reported-by: Luis Rodrigues <lfrodrigues@gmail.com> Signed-off-by: Paul Fertser <fercerpav@gmail.com> Reviewed-on: http://openocd.zylin.com/2249 Tested-by: jenkins Reviewed-by: Spencer Oliver <spen@spen-soft.co.uk>
Diffstat (limited to 'src/flash/nor/stm32f1x.c')
-rw-r--r--src/flash/nor/stm32f1x.c19
1 files changed, 17 insertions, 2 deletions
diff --git a/src/flash/nor/stm32f1x.c b/src/flash/nor/stm32f1x.c
index 601417a..c9757d8 100644
--- a/src/flash/nor/stm32f1x.c
+++ b/src/flash/nor/stm32f1x.c
@@ -894,7 +894,7 @@ static int stm32x_probe(struct flash_bank *bank)
stm32x_info->ppage_size = 4;
max_flash_size_in_kb = 128;
break;
- case 0x422: /* stm32f30x */
+ case 0x422: /* stm32f302xb/c */
page_size = 2048;
stm32x_info->ppage_size = 2;
max_flash_size_in_kb = 256;
@@ -922,6 +922,7 @@ static int stm32x_probe(struct flash_bank *bank)
stm32x_info->default_rdp = 0x55AA;
break;
case 0x438: /* stm32f33x */
+ case 0x439: /* stm32f302x6/8 */
page_size = 2048;
stm32x_info->ppage_size = 2;
max_flash_size_in_kb = 64;
@@ -1125,7 +1126,7 @@ static int get_stm32x_info(struct flash_bank *bank, char *buf, int buf_size)
break;
case 0x422:
- device_str = "STM32F30x";
+ device_str = "STM32F302xB/C";
switch (rev_id) {
case 0x1000:
@@ -1194,6 +1195,20 @@ static int get_stm32x_info(struct flash_bank *bank, char *buf, int buf_size)
}
break;
+ case 0x439:
+ device_str = "STM32F302x6/8";
+
+ switch (rev_id) {
+ case 0x1000:
+ rev_str = "A";
+ break;
+
+ case 0x1001:
+ rev_str = "Z";
+ break;
+ }
+ break;
+
case 0x444:
device_str = "STM32F03x";