[CM3] Fix the set clksource, found and described by ksarkies.
This commit is contained in:
parent
822654b16b
commit
8c8592e2b6
@ -86,9 +86,8 @@ uint32_t systick_get_value(void)
|
||||
|
||||
void systick_set_clocksource(uint8_t clocksource)
|
||||
{
|
||||
if (clocksource < 2) {
|
||||
STK_CSR |= clocksource;
|
||||
}
|
||||
STK_CSR = (STK_CSR & ~STK_CSR_CLKSOURCE) |
|
||||
(clocksource & STK_CSR_CLKSOURCE);
|
||||
}
|
||||
|
||||
/*---------------------------------------------------------------------------*/
|
||||
|
Loading…
x
Reference in New Issue
Block a user