File tree Expand file tree Collapse file tree 14 files changed +83
-24
lines changed
generic_stm32f103c/wirish
generic_stm32f103r8/wirish
generic_stm32f103r/wirish
generic_stm32f103t/wirish
generic_stm32f103v/wirish
generic_stm32f103z/wirish Expand file tree Collapse file tree 14 files changed +83
-24
lines changed Original file line number Diff line number Diff line change @@ -38,6 +38,14 @@ mapleMini.menu.bootloader_version.bootloader20.upload.flash.maximum_size=122880
3838mapleMini.menu.bootloader_version.bootloader20.upload.maximum_size=122880
3939mapleMini.menu.bootloader_version.bootloader20.upload.altID=2
4040
41+ #-- CPU Clock frequency
42+ mapleMini.menu.cpu_speed.speed_72mhz=72Mhz (Normal)
43+ mapleMini.menu.cpu_speed.speed_72mhz.build.f_cpu=72000000L
44+
45+ mapleMini.menu.cpu_speed.speed_48mhz=48Mhz (Slow - with USB)
46+ mapleMini.menu.cpu_speed.speed_48mhz.build.f_cpu=48000000L
47+
48+
4149##############################################################
4250maple.name=Maple (Rev 3)
4351
@@ -217,6 +225,13 @@ genericSTM32F103C.menu.upload_method.jlinkMethod.upload.protocol=jlink
217225genericSTM32F103C.menu.upload_method.jlinkMethod.upload.tool=jlink_upload
218226genericSTM32F103C.menu.upload_method.jlinkMethod.build.upload_flags=-DCONFIG_MAPLE_MINI_NO_DISABLE_DEBUG=1 -DSERIAL_USB -DGENERIC_BOOTLOADER
219227
228+ #-- CPU Clock frequency
229+ genericSTM32F103C.menu.cpu_speed.speed_72mhz=72Mhz (Normal)
230+ genericSTM32F103C.menu.cpu_speed.speed_72mhz.build.f_cpu=72000000L
231+
232+ genericSTM32F103C.menu.cpu_speed.speed_48mhz=48Mhz (Slow - with USB)
233+ genericSTM32F103C.menu.cpu_speed.speed_48mhz.build.f_cpu=48000000L
234+
220235########################### Generic STM32F103R ###########################
221236
222237genericSTM32F103R.name=Generic STM32F103R series
Original file line number Diff line number Diff line change @@ -71,7 +71,7 @@ namespace wirish {
7171 #if F_CPU == 72000000
7272 rcc_set_prescaler (RCC_PRESCALER_USB, RCC_USB_SYSCLK_DIV_1_5);
7373 #elif F_CPU == 48000000
74- rcc_set_prescaler (RCC_PRESCALER_USB, RCC_USB_SYSCLK_DIV_1_5 );
74+ rcc_set_prescaler (RCC_PRESCALER_USB, RCC_USB_SYSCLK_DIV_1 );
7575 #endif
7676 }
7777
Original file line number Diff line number Diff line change @@ -80,7 +80,7 @@ namespace wirish {
8080 #elif F_CPU == 72000000
8181 rcc_set_prescaler (RCC_PRESCALER_USB, RCC_USB_SYSCLK_DIV_1_5);
8282 #elif F_CPU == 48000000
83- rcc_set_prescaler (RCC_PRESCALER_USB, RCC_USB_SYSCLK_DIV_1_5 );
83+ rcc_set_prescaler (RCC_PRESCALER_USB, RCC_USB_SYSCLK_DIV_1 );
8484 #endif
8585 }
8686
Original file line number Diff line number Diff line change 4848// works for F103 performance line MCUs, which is all that LeafLabs
4949// currently officially supports).
5050#ifndef BOARD_RCC_PLLMUL
51- #define BOARD_RCC_PLLMUL RCC_PLLMUL_9
51+ #if F_CPU==72000000
52+ #define BOARD_RCC_PLLMUL RCC_PLLMUL_9
53+ #elif F_CPU==48000000
54+ #define BOARD_RCC_PLLMUL RCC_PLLMUL_6
55+ #endif
5256#endif
5357
5458namespace wirish {
@@ -71,7 +75,7 @@ namespace wirish {
7175 #if F_CPU == 72000000
7276 rcc_set_prescaler (RCC_PRESCALER_USB, RCC_USB_SYSCLK_DIV_1_5);
7377 #elif F_CPU == 48000000
74- rcc_set_prescaler (RCC_PRESCALER_USB, RCC_USB_SYSCLK_DIV_1_5 );
78+ rcc_set_prescaler (RCC_PRESCALER_USB, RCC_USB_SYSCLK_DIV_1 );
7579 #endif
7680 }
7781
Original file line number Diff line number Diff line change 4848// works for F103 performance line MCUs, which is all that LeafLabs
4949// currently officially supports).
5050#ifndef BOARD_RCC_PLLMUL
51- #define BOARD_RCC_PLLMUL RCC_PLLMUL_9
51+ #if F_CPU==72000000
52+ #define BOARD_RCC_PLLMUL RCC_PLLMUL_9
53+ #elif F_CPU==48000000
54+ #define BOARD_RCC_PLLMUL RCC_PLLMUL_6
55+ #endif
5256#endif
5357
5458namespace wirish {
@@ -71,7 +75,7 @@ namespace wirish {
7175 #if F_CPU == 72000000
7276 rcc_set_prescaler (RCC_PRESCALER_USB, RCC_USB_SYSCLK_DIV_1_5);
7377 #elif F_CPU == 48000000
74- rcc_set_prescaler (RCC_PRESCALER_USB, RCC_USB_SYSCLK_DIV_1_5 );
78+ rcc_set_prescaler (RCC_PRESCALER_USB, RCC_USB_SYSCLK_DIV_1 );
7579 #endif
7680 }
7781
Original file line number Diff line number Diff line change 4848// works for F103 performance line MCUs, which is all that LeafLabs
4949// currently officially supports).
5050#ifndef BOARD_RCC_PLLMUL
51- #define BOARD_RCC_PLLMUL RCC_PLLMUL_9
51+ #if F_CPU==72000000
52+ #define BOARD_RCC_PLLMUL RCC_PLLMUL_9
53+ #elif F_CPU==48000000
54+ #define BOARD_RCC_PLLMUL RCC_PLLMUL_6
55+ #endif
5256#endif
5357
5458namespace wirish {
@@ -71,7 +75,7 @@ namespace wirish {
7175 #if F_CPU == 72000000
7276 rcc_set_prescaler (RCC_PRESCALER_USB, RCC_USB_SYSCLK_DIV_1_5);
7377 #elif F_CPU == 48000000
74- rcc_set_prescaler (RCC_PRESCALER_USB, RCC_USB_SYSCLK_DIV_1_5 );
78+ rcc_set_prescaler (RCC_PRESCALER_USB, RCC_USB_SYSCLK_DIV_1 );
7579 #endif
7680 }
7781
Original file line number Diff line number Diff line change 4848// works for F103 performance line MCUs, which is all that LeafLabs
4949// currently officially supports).
5050#ifndef BOARD_RCC_PLLMUL
51- #define BOARD_RCC_PLLMUL RCC_PLLMUL_9
51+ #if F_CPU==72000000
52+ #define BOARD_RCC_PLLMUL RCC_PLLMUL_9
53+ #elif F_CPU==48000000
54+ #define BOARD_RCC_PLLMUL RCC_PLLMUL_6
55+ #endif
5256#endif
5357
5458namespace wirish {
@@ -71,7 +75,7 @@ namespace wirish {
7175 #if F_CPU == 72000000
7276 rcc_set_prescaler (RCC_PRESCALER_USB, RCC_USB_SYSCLK_DIV_1_5);
7377 #elif F_CPU == 48000000
74- rcc_set_prescaler (RCC_PRESCALER_USB, RCC_USB_SYSCLK_DIV_1_5 );
78+ rcc_set_prescaler (RCC_PRESCALER_USB, RCC_USB_SYSCLK_DIV_1 );
7579 #endif
7680 }
7781
Original file line number Diff line number Diff line change 4848// works for F103 performance line MCUs, which is all that LeafLabs
4949// currently officially supports).
5050#ifndef BOARD_RCC_PLLMUL
51- #define BOARD_RCC_PLLMUL RCC_PLLMUL_9
51+ #if F_CPU==72000000
52+ #define BOARD_RCC_PLLMUL RCC_PLLMUL_9
53+ #elif F_CPU==48000000
54+ #define BOARD_RCC_PLLMUL RCC_PLLMUL_6
55+ #endif
5256#endif
5357
5458namespace wirish {
@@ -71,7 +75,7 @@ namespace wirish {
7175 #if F_CPU == 72000000
7276 rcc_set_prescaler (RCC_PRESCALER_USB, RCC_USB_SYSCLK_DIV_1_5);
7377 #elif F_CPU == 48000000
74- rcc_set_prescaler (RCC_PRESCALER_USB, RCC_USB_SYSCLK_DIV_1_5 );
78+ rcc_set_prescaler (RCC_PRESCALER_USB, RCC_USB_SYSCLK_DIV_1 );
7579 #endif
7680 }
7781
Original file line number Diff line number Diff line change 4848// works for F103 performance line MCUs, which is all that LeafLabs
4949// currently officially supports).
5050#ifndef BOARD_RCC_PLLMUL
51- #define BOARD_RCC_PLLMUL RCC_PLLMUL_9
51+ #if F_CPU==72000000
52+ #define BOARD_RCC_PLLMUL RCC_PLLMUL_9
53+ #elif F_CPU==48000000
54+ #define BOARD_RCC_PLLMUL RCC_PLLMUL_6
55+ #endif
5256#endif
5357
5458namespace wirish {
@@ -71,7 +75,7 @@ namespace wirish {
7175 #if F_CPU == 72000000
7276 rcc_set_prescaler (RCC_PRESCALER_USB, RCC_USB_SYSCLK_DIV_1_5);
7377 #elif F_CPU == 48000000
74- rcc_set_prescaler (RCC_PRESCALER_USB, RCC_USB_SYSCLK_DIV_1_5 );
78+ rcc_set_prescaler (RCC_PRESCALER_USB, RCC_USB_SYSCLK_DIV_1 );
7579 #endif
7680 }
7781
Original file line number Diff line number Diff line change 4848// works for F103 performance line MCUs, which is all that LeafLabs
4949// currently officially supports).
5050#ifndef BOARD_RCC_PLLMUL
51- #define BOARD_RCC_PLLMUL RCC_PLLMUL_9
51+ #if F_CPU==72000000
52+ #define BOARD_RCC_PLLMUL RCC_PLLMUL_9
53+ #elif F_CPU==48000000
54+ #define BOARD_RCC_PLLMUL RCC_PLLMUL_6
55+ #endif
5256#endif
5357
5458namespace wirish {
@@ -71,7 +75,7 @@ namespace wirish {
7175 #if F_CPU == 72000000
7276 rcc_set_prescaler (RCC_PRESCALER_USB, RCC_USB_SYSCLK_DIV_1_5);
7377 #elif F_CPU == 48000000
74- rcc_set_prescaler (RCC_PRESCALER_USB, RCC_USB_SYSCLK_DIV_1_5 );
78+ rcc_set_prescaler (RCC_PRESCALER_USB, RCC_USB_SYSCLK_DIV_1 );
7579 #endif
7680 }
7781
You can’t perform that action at this time.
0 commit comments