Skip to content

Commit

Permalink
STM32G系列配置精简
Browse files Browse the repository at this point in the history
  • Loading branch information
chenhaimeng committed Dec 16, 2021
1 parent 72e4735 commit e2c4e62
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 14 deletions.
4 changes: 1 addition & 3 deletions _config/b_config.h
Original file line number Diff line number Diff line change
Expand Up @@ -48,9 +48,7 @@
//<1002=> STM32F10X_MD
//<1003=> STM32F10X_HD
//<1004=> STM32F10X_CL
//<1101=> STM32G030
//<1102=> STM32G070
//<1103=> STM32G0B0
//<1101=> STM32G0X0
//<2001=> NATION_F40X
//<3001=> MM32SPIN2X
//<4001=> HC32L13X
Expand Down
13 changes: 2 additions & 11 deletions bos/mcu/st/stm32g0x0/mcu_stm32g0x0_flash.c
Original file line number Diff line number Diff line change
Expand Up @@ -35,21 +35,12 @@
#include "b_config.h"
#include "hal/inc/b_hal_flash.h"

#if (_MCU_PLATFORM == 1101 || _MCU_PLATFORM == 1102 || _MCU_PLATFORM == 1103)
#if (_MCU_PLATFORM == 1101 )

#define FLASH_BASE_ADDR (0x8000000UL)

//#ifndef FLASH_PAGE_SIZE
//#define FLASH_PAGE_SIZE (2048)
//#endif
#define FLASH_MAX_SIZE (*((volatile uint32_t *)0x1FFF75E0) * 1024)

#if (_MCU_PLATFORM == 1101)
#define FLASH_MAX_SIZE (64 * 1024)
#elif (_MCU_PLATFORM == 1102)
#define FLASH_MAX_SIZE (128 * 1024)
#elif (_MCU_PLATFORM == 1103)
#define FLASH_MAX_SIZE (512 * 1024)
#endif

#define FLASH_KEY_1 (0x45670123UL)
#define FLASH_KEY_2 (0xCDEF89ABUL)
Expand Down

0 comments on commit e2c4e62

Please sign in to comment.