Fix the STK_CTRL to the STK_CSR library change.
This commit is contained in:
parent
e5624a7e6d
commit
690e99c6b2
|
@ -84,7 +84,7 @@ int main(void)
|
||||||
|
|
||||||
stlink_set_rev();
|
stlink_set_rev();
|
||||||
|
|
||||||
systick_set_clocksource(STK_CTRL_CLKSOURCE_AHB_DIV8);
|
systick_set_clocksource(STK_CSR_CLKSOURCE_AHB_DIV8);
|
||||||
systick_set_reload(900000);
|
systick_set_reload(900000);
|
||||||
|
|
||||||
dfu_protect(UPD_MODE);
|
dfu_protect(UPD_MODE);
|
||||||
|
|
|
@ -38,7 +38,7 @@ static int stlink_test_nrst(void)
|
||||||
uint16_t pin;
|
uint16_t pin;
|
||||||
uint32_t systick_value;
|
uint32_t systick_value;
|
||||||
|
|
||||||
systick_set_clocksource(STK_CTRL_CLKSOURCE_AHB_DIV8);
|
systick_set_clocksource(STK_CSR_CLKSOURCE_AHB_DIV8);
|
||||||
systick_set_reload(0xffffff); /* no underflow for about 16.7 seconds*/
|
systick_set_reload(0xffffff); /* no underflow for about 16.7 seconds*/
|
||||||
systick_counter_enable();
|
systick_counter_enable();
|
||||||
/* systick ist now running with 1 MHz, systick counts down */
|
/* systick ist now running with 1 MHz, systick counts down */
|
||||||
|
|
Loading…
Reference in New Issue