flash/nor/stm32f1x: Add support for GD32F1x0/3x0 64/6164/4
authorasier70 <asier70@gmail.com>
Mon, 12 Apr 2021 12:09:36 +0000 (14:09 +0200)
committerTomas Vanek <vanekt@fbl.cz>
Sun, 2 May 2021 21:39:38 +0000 (22:39 +0100)
commit64a3e7ba4f47c5340543d9a5cadd41bc45d93c93
treebecc840b87051aa1d0481c292a89c774e8dd85ef
parent87c90393fedc8bb278d189aa53bcd93f4892012b
flash/nor/stm32f1x: Add support for GD32F1x0/3x0

Nowadays, when it's difficult to buy STM32F030,
the use of GD32F130 seems to be an interesting functional alternative.
This is cortex-M3 and it works with the stm32f1x driver, but unfortunately not fully.
The main difference is another offset of user option bits
(like WDG_SW, nRST_STOP, nRST_STDBY) in option byte register
(FLASH_OBR/FMC_OBSTAT 0x4002201C).
Any use of functions like lock or unlock results in change default values of the those bits stored in flash.
Thus broken microcontroller is malfunctioning, e.g. flash block programming is interrupted
by unexpected active hardware watchog (after 0.4s).
This patch is a simplified version of #4592 done by Dominik Peklo (http://openocd.zylin.com/#/c/4592/).
GigaDevice GD32F1x0 & GD32F3x0 series devices share DEV_ID
with STM32F101/2/3 medium-density line,
however they use a REV_ID different from any STM32 device,
so can be succesfully detected.

Change-Id: I252cdf738d94983b70676a3497326f90c329e292
Signed-off-by: asier70Andrzej Sierżęga <asier70@gmail.com>
Reviewed-on: http://openocd.zylin.com/6164
Tested-by: jenkins
Reviewed-by: Tomas Vanek <vanekt@fbl.cz>
doc/openocd.texi
src/flash/nor/stm32f1x.c

Linking to existing account procedure

If you already have an account and want to add another login method you MUST first sign in with your existing account and then change URL to read https://review.openocd.org/login/?link to get to this page again but this time it'll work for linking. Thank you.

SSH host keys fingerprints

1024 SHA256:YKx8b7u5ZWdcbp7/4AeXNaqElP49m6QrwfXaqQGJAOk gerrit-code-review@openocd.zylin.com (DSA)
384 SHA256:jHIbSQa4REvwCFG4cq5LBlBLxmxSqelQPem/EXIrxjk gerrit-code-review@openocd.org (ECDSA)
521 SHA256:UAOPYkU9Fjtcao0Ul/Rrlnj/OsQvt+pgdYSZ4jOYdgs gerrit-code-review@openocd.org (ECDSA)
256 SHA256:A13M5QlnozFOvTllybRZH6vm7iSt0XLxbA48yfc2yfY gerrit-code-review@openocd.org (ECDSA)
256 SHA256:spYMBqEYoAOtK7yZBrcwE8ZpYt6b68Cfh9yEVetvbXg gerrit-code-review@openocd.org (ED25519)
+--[ED25519 256]--+
|=..              |
|+o..   .         |
|*.o   . .        |
|+B . . .         |
|Bo. = o S        |
|Oo.+ + =         |
|oB=.* = . o      |
| =+=.+   + E     |
|. .=o   . o      |
+----[SHA256]-----+
2048 SHA256:0Onrb7/PHjpo6iVZ7xQX2riKN83FJ3KGU0TvI0TaFG4 gerrit-code-review@openocd.zylin.com (RSA)