diff --git a/libopencm3 b/libopencm3 index f4cd74a..a909b5c 160000 --- a/libopencm3 +++ b/libopencm3 @@ -1 +1 @@ -Subproject commit f4cd74a741084decb805d8dd15253f77f404ad24 +Subproject commit a909b5ca9e18f802e3caef19e63d38861662c128 diff --git a/src/platforms/f4discovery/platform.c b/src/platforms/f4discovery/platform.c index 6ee36bd..2786954 100644 --- a/src/platforms/f4discovery/platform.c +++ b/src/platforms/f4discovery/platform.c @@ -81,7 +81,7 @@ int platform_init(void) LED_UART | LED_IDLE_RUN | LED_ERROR | LED_BOOTLOADER); /* Setup heartbeat timer */ - systick_set_clocksource(STK_CTRL_CLKSOURCE_AHB_DIV8); + systick_set_clocksource(STK_CSR_CLKSOURCE_AHB_DIV8); systick_set_reload(168000000/(10*8)); /* Interrupt us at 10 Hz */ SCB_SHPR(11) &= ~((15 << 4) & 0xff); SCB_SHPR(11) |= ((14 << 4) & 0xff); diff --git a/src/platforms/f4discovery/usbdfu.c b/src/platforms/f4discovery/usbdfu.c index 998628b..b7af115 100644 --- a/src/platforms/f4discovery/usbdfu.c +++ b/src/platforms/f4discovery/usbdfu.c @@ -42,7 +42,7 @@ int main(void) /* Set up clock*/ rcc_clock_setup_hse_3v3(&hse_8mhz_3v3[CLOCK_3V3_168MHZ]); - systick_set_clocksource(STK_CTRL_CLKSOURCE_AHB_DIV8); + systick_set_clocksource(STK_CSR_CLKSOURCE_AHB_DIV8); systick_set_reload(2100000); systick_interrupt_enable(); diff --git a/src/platforms/native/platform.c b/src/platforms/native/platform.c index 214625e..c0ce658 100644 --- a/src/platforms/native/platform.c +++ b/src/platforms/native/platform.c @@ -119,7 +119,7 @@ int platform_init(void) } /* Setup heartbeat timer */ - systick_set_clocksource(STK_CTRL_CLKSOURCE_AHB_DIV8); + systick_set_clocksource(STK_CSR_CLKSOURCE_AHB_DIV8); systick_set_reload(900000); /* Interrupt us at 10 Hz */ SCB_SHPR(11) &= ~((15 << 4) & 0xff); SCB_SHPR(11) |= ((14 << 4) & 0xff); diff --git a/src/platforms/native/usbdfu.c b/src/platforms/native/usbdfu.c index 35572a5..068138e 100644 --- a/src/platforms/native/usbdfu.c +++ b/src/platforms/native/usbdfu.c @@ -41,7 +41,7 @@ int main(void) dfu_protect_enable(); rcc_clock_setup_in_hse_8mhz_out_72mhz(); - systick_set_clocksource(STK_CTRL_CLKSOURCE_AHB_DIV8); + systick_set_clocksource(STK_CSR_CLKSOURCE_AHB_DIV8); systick_set_reload(900000); rcc_peripheral_enable_clock(&RCC_APB2ENR, RCC_APB2ENR_IOPAEN); diff --git a/src/platforms/stlink/platform.c b/src/platforms/stlink/platform.c index 03509ea..d7ae41d 100644 --- a/src/platforms/stlink/platform.c +++ b/src/platforms/stlink/platform.c @@ -22,13 +22,13 @@ * implementation. */ -#include +#include #include #include #include #include #include -#include +#include #include "platform.h" #include "jtag_scan.h" @@ -108,7 +108,7 @@ int platform_init(void) GPIO_CNF_OUTPUT_PUSHPULL, led_idle_run); /* Setup heartbeat timer */ - systick_set_clocksource(STK_CTRL_CLKSOURCE_AHB_DIV8); + systick_set_clocksource(STK_CSR_CLKSOURCE_AHB_DIV8); systick_set_reload(900000); /* Interrupt us at 10 Hz */ SCB_SHPR(11) &= ~((15 << 4) & 0xff); SCB_SHPR(11) |= ((14 << 4) & 0xff); diff --git a/src/platforms/stlink/usbdfu.c b/src/platforms/stlink/usbdfu.c index 76a19b0..c14fd5a 100644 --- a/src/platforms/stlink/usbdfu.c +++ b/src/platforms/stlink/usbdfu.c @@ -95,7 +95,7 @@ int main(void) dfu_protect_enable(); rcc_clock_setup_in_hse_8mhz_out_72mhz(); - systick_set_clocksource(STK_CTRL_CLKSOURCE_AHB_DIV8); + systick_set_clocksource(STK_CSR_CLKSOURCE_AHB_DIV8); systick_set_reload(900000); /* Handle USB disconnect/connect */ diff --git a/src/platforms/swlink/platform.c b/src/platforms/swlink/platform.c index 1b45cfb..ea88dcb 100644 --- a/src/platforms/swlink/platform.c +++ b/src/platforms/swlink/platform.c @@ -86,7 +86,7 @@ int platform_init(void) AFIO_MAPR = data; /* Setup heartbeat timer */ - systick_set_clocksource(STK_CTRL_CLKSOURCE_AHB_DIV8); + systick_set_clocksource(STK_CSR_CLKSOURCE_AHB_DIV8); systick_set_reload(900000); /* Interrupt us at 10 Hz */ SCB_SHPR(11) &= ~((15 << 4) & 0xff); SCB_SHPR(11) |= ((14 << 4) & 0xff); diff --git a/src/platforms/swlink/usbdfu.c b/src/platforms/swlink/usbdfu.c index 29c3809..69cc1e2 100644 --- a/src/platforms/swlink/usbdfu.c +++ b/src/platforms/swlink/usbdfu.c @@ -61,7 +61,7 @@ int main(void) dfu_protect_enable(); rcc_clock_setup_in_hse_8mhz_out_72mhz(); - systick_set_clocksource(STK_CTRL_CLKSOURCE_AHB_DIV8); + systick_set_clocksource(STK_CSR_CLKSOURCE_AHB_DIV8); systick_set_reload(900000); /* Handle USB disconnect/connect */