Skip to content

Commit

Permalink
Replace the deprecated libopencm3 functions.
Browse files Browse the repository at this point in the history
  • Loading branch information
hemashushu committed Mar 8, 2023
1 parent 9c11e18 commit dc58660
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 4 deletions.
3 changes: 2 additions & 1 deletion src/stm32f103/bluepill/target.c
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,8 @@ void cpu_setup(void) {

/* Set STM32 to 72 MHz. */
void clock_setup(void) {
rcc_clock_setup_in_hse_8mhz_out_72mhz();
// rcc_clock_setup_in_hse_8mhz_out_72mhz();
rcc_clock_setup_pll(&rcc_hse_configs[RCC_CLOCK_HSE8_72MHZ]);
}

void gpio_setup(void) {
Expand Down
3 changes: 2 additions & 1 deletion src/stm32f103/stlinkv2-1/target.c
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,8 @@ void cpu_setup(void) {

/* Set STM32 to 72 MHz. */
void clock_setup(void) {
rcc_clock_setup_in_hse_8mhz_out_72mhz();
// rcc_clock_setup_in_hse_8mhz_out_72mhz();
rcc_clock_setup_pll(&rcc_hse_configs[RCC_CLOCK_HSE8_72MHZ]);
}

void gpio_setup(void) {
Expand Down
5 changes: 3 additions & 2 deletions src/stm32f103/stlinkv2-dongle/target.c
Original file line number Diff line number Diff line change
Expand Up @@ -29,12 +29,13 @@ void cpu_setup(void) {

/* Set STM32 to 72 MHz. */
void clock_setup(void) {
rcc_clock_setup_in_hse_8mhz_out_72mhz();
// rcc_clock_setup_in_hse_8mhz_out_72mhz();
rcc_clock_setup_pll(&rcc_hse_configs[RCC_CLOCK_HSE8_72MHZ]);
}

void gpio_setup(void) {
/*
LED0, 1, 2 on PA9,
LED0, 1, 2 on PA9,
RX (MCU-side) on PB11
TGT_RST on PB6
TGT_SWDIO, TGT_SWCLK on PB14, PB13
Expand Down

0 comments on commit dc58660

Please sign in to comment.