Skip to content

Commit

Permalink
Merge pull request #878 from purewack/master
Browse files Browse the repository at this point in the history
Added build options to select HSI clock source - Generic F103C8
  • Loading branch information
stevstrong committed Nov 3, 2023
2 parents cca05ed + b59ea46 commit 20d38f8
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 1 deletion.
9 changes: 9 additions & 0 deletions STM32F1/boards.txt
Original file line number Diff line number Diff line change
Expand Up @@ -396,6 +396,15 @@ genericSTM32F103C.menu.upload_method.HIDUploadMethod.build.vect=VECT_TAB_ADDR=0x
genericSTM32F103C.menu.upload_method.HIDUploadMethod.build.ldscript=ld/hid_bootloader.ld

#-- CPU Clock frequency

genericSTM32F103C.menu.cpu_speed.speed_hsi_64mhz=64Mhz (HSI)
genericSTM32F103C.menu.cpu_speed.speed_hsi_64mhz.build.f_cpu=64000000L
genericSTM32F103C.menu.cpu_speed.speed_hsi_64mhz.build.hs_flag=-DUSE_HSI_CLOCK

genericSTM32F103C.menu.cpu_speed.speed_hsi_48mhz=48Mhz (HSI- USB)
genericSTM32F103C.menu.cpu_speed.speed_hsi_48mhz.build.f_cpu=48000000L
genericSTM32F103C.menu.cpu_speed.speed_hsi_48mhz.build.hs_flag=-DUSE_HSI_CLOCK -DHSI_USB_SPEED

genericSTM32F103C.menu.cpu_speed.speed_72mhz=72Mhz (Normal)
genericSTM32F103C.menu.cpu_speed.speed_72mhz.build.f_cpu=72000000L

Expand Down
6 changes: 5 additions & 1 deletion STM32F1/variants/generic_stm32f103c/wirish/boards_setup.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,11 @@
#define BOARD_RCC_PLLMUL RCC_PLLMUL_2
#endif
#else
#define BOARD_RCC_PLLMUL RCC_PLLMUL_16
#if !HSI_USB_SPEED
#define BOARD_RCC_PLLMUL RCC_PLLMUL_16
#else
#define BOARD_RCC_PLLMUL RCC_PLLMUL_12
#endif
#endif
#endif

Expand Down

0 comments on commit 20d38f8

Please sign in to comment.