We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent cab12b1 commit 93481aeCopy full SHA for 93481ae
atmel-samd/tick.c
@@ -46,11 +46,8 @@ void SysTick_Handler(void) {
46
47
void tick_init() {
48
uint32_t ticks_per_ms = common_hal_mcu_processor_get_frequency() / 1000;
49
- SysTick->LOAD = ((ticks_per_ms - 1) << SysTick_LOAD_RELOAD_Pos);
+ SysTick_Config(ticks_per_ms);
50
NVIC_EnableIRQ(SysTick_IRQn);
51
- SysTick->CTRL = (1 << SysTick_CTRL_ENABLE_Pos) |
52
- (1 << SysTick_CTRL_TICKINT_Pos)|
53
- (1 << SysTick_CTRL_CLKSOURCE_Pos);
54
}
55
56
void tick_delay(uint32_t us) {
0 commit comments