Skip to content

Commit

Permalink
flash/nor/stm32f1x: Add support for Geehy APM32F0 series
Browse files Browse the repository at this point in the history
Tested with APM32F030C8T.

Change-Id: I63cd8b66424135dae481a96ba560e6f0b1f9544e
Suggested-by: Christian U <[email protected]>
Signed-off-by: Marc Schink <[email protected]>
Reviewed-on: https://review.openocd.org/c/openocd/+/8014
Tested-by: jenkins
Reviewed-by: Tomas Vanek <[email protected]>
Reviewed-by: Antonio Borneo <[email protected]>
  • Loading branch information
zapb-0 authored and borneoa committed Dec 30, 2023
1 parent 5394e5b commit a90b164
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 6 deletions.
10 changes: 4 additions & 6 deletions doc/openocd.texi
Original file line number Diff line number Diff line change
Expand Up @@ -7707,12 +7707,10 @@ applied to all of them.
@end deffn

@deffn {Flash Driver} {stm32f1x}
All members of the STM32F0, STM32F1 and STM32F3 microcontroller families
from STMicroelectronics and all members of the GD32F1x0, GD32F3x0 and GD32E23x microcontroller
families from GigaDevice include internal flash and use ARM Cortex-M0/M3/M4/M23 cores.
The driver also works with GD32VF103 powered by RISC-V core.
The driver automatically recognizes a number of these chips using
the chip identification register, and autoconfigures itself.
This driver supports the STM32F0, STM32F1 and STM32F3 microcontroller series from STMicroelectronics.
The driver is also compatible with the GD32F1, GD32VF103 (RISC-V core), GD32F3 and GD32E23 microcontroller series from GigaDevice.
The driver also supports the APM32F0 series from Geehy Semiconductor.
The driver automatically recognizes a number of these chips using the chip identification register, and autoconfigures itself.

@example
flash bank $_FLASHNAME stm32f1x 0 0 0 0 $_TARGETNAME
Expand Down
1 change: 1 addition & 0 deletions src/flash/nor/stm32f1x.c
Original file line number Diff line number Diff line change
Expand Up @@ -745,6 +745,7 @@ static int stm32x_get_property_addr(struct target *target, struct stm32x_propert

switch (cortex_m_get_impl_part(target)) {
case CORTEX_M0_PARTNO: /* STM32F0x devices */
case CORTEX_M0P_PARTNO: /* APM32F0x devices */
addr->device_id = 0x40015800;
addr->flash_size = 0x1FFFF7CC;
return ERROR_OK;
Expand Down

0 comments on commit a90b164

Please sign in to comment.