Skip to content

Commit 801ce35

Browse files
fpistmkgamecarter
andcommittedJul 1, 2019
Add STM32F030F4 Demo board 16MHz
Co-authored-by: kgame <[email protected]> Signed-off-by: Frederic.Pillon <[email protected]>
1 parent 580aa3b commit 801ce35

File tree

3 files changed

+19
-3
lines changed

3 files changed

+19
-3
lines changed
 

‎boards.txt

Lines changed: 11 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -565,18 +565,26 @@ GenF0.name=Generic STM32F0 series
565565

566566
GenF0.build.core=arduino
567567
GenF0.build.board=GenF0
568+
GenF0.build.mcu=cortex-m0
569+
GenF0.build.series=STM32F0xx
570+
GenF0.build.cmsis_lib_gcc=arm_cortexM0l_math
568571
GenF0.build.extra_flags=-D{build.product_line} {build.xSerial}
569572

570573
# DEMO_F030F4 board
571574
GenF0.menu.pnum.DEMO_F030F4=STM32F030F4 Demo board
572575
GenF0.menu.pnum.DEMO_F030F4.upload.maximum_data_size=4096
573576
GenF0.menu.pnum.DEMO_F030F4.upload.maximum_size=16384
574-
GenF0.menu.pnum.DEMO_F030F4.build.mcu=cortex-m0
575577
GenF0.menu.pnum.DEMO_F030F4.build.board=DEMO_F030F4
576-
GenF0.menu.pnum.DEMO_F030F4.build.series=STM32F0xx
577578
GenF0.menu.pnum.DEMO_F030F4.build.product_line=STM32F030x6
578579
GenF0.menu.pnum.DEMO_F030F4.build.variant=DEMO_F030F4
579-
GenF0.menu.pnum.DEMO_F030F4.build.cmsis_lib_gcc=arm_cortexM0l_math
580+
581+
# DEMO_F030F4_16M board
582+
GenF0.menu.pnum.DEMO_F030F4_16M=STM32F030F4 Demo board (16Mhz)
583+
GenF0.menu.pnum.DEMO_F030F4_16M.upload.maximum_data_size=4096
584+
GenF0.menu.pnum.DEMO_F030F4_16M.upload.maximum_size=16384
585+
GenF0.menu.pnum.DEMO_F030F4_16M.build.board=DEMO_F030F4_16M
586+
GenF0.menu.pnum.DEMO_F030F4_16M.build.product_line=STM32F030x6
587+
GenF0.menu.pnum.DEMO_F030F4_16M.build.variant=DEMO_F030F4
580588

581589
# Upload menu
582590
GenF0.menu.upload_method.swdMethod=STM32CubeProgrammer (SWD)

‎variants/DEMO_F030F4/variant.cpp

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -95,7 +95,11 @@ WEAK void SystemClock_Config(void)
9595
RCC_OscInitStruct.PLL.PLLState = RCC_PLL_ON;
9696
RCC_OscInitStruct.PLL.PLLSource = RCC_PLLSOURCE_HSE;
9797
RCC_OscInitStruct.PLL.PLLMUL = RCC_PLL_MUL6;
98+
#ifdef ARDUINO_DEMO_F030F4_16M
99+
RCC_OscInitStruct.PLL.PREDIV = RCC_PREDIV_DIV2;
100+
#else
98101
RCC_OscInitStruct.PLL.PREDIV = RCC_PREDIV_DIV1;
102+
#endif
99103
if (HAL_RCC_OscConfig(&RCC_OscInitStruct) != HAL_OK) {
100104
_Error_Handler(__FILE__, __LINE__);
101105
}

‎variants/DEMO_F030F4/variant.h

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -89,6 +89,10 @@ extern "C" {
8989
#define PIN_SERIAL_RX PA3
9090
#define PIN_SERIAL_TX PA2
9191

92+
#ifdef ARDUINO_DEMO_F030F4_16M
93+
#define HSE_VALUE 16000000U /*!< Value of the External oscillator in Hz */
94+
#endif
95+
9296
#ifdef __cplusplus
9397
} // extern "C"
9498
#endif

0 commit comments

Comments
 (0)
Please sign in to comment.