Skip to content

Commit

Permalink
simplify clock config
Browse files Browse the repository at this point in the history
  • Loading branch information
bkleiner committed May 26, 2024
1 parent 106f12b commit b851c32
Show file tree
Hide file tree
Showing 13 changed files with 278 additions and 2,512 deletions.
1 change: 0 additions & 1 deletion src/driver/at32/system.h
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
#pragma once

#ifdef AT32F4
#include <at32f435_437_clock.h>
#include <at32f435_437_conf.h>
#endif

Expand Down
1 change: 0 additions & 1 deletion src/driver/at32/time.c
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,6 @@ static void debug_time_init() {
}

void time_init() {
system_clock_config();
crm_periph_clock_enable(CRM_SCFG_PERIPH_CLOCK, TRUE);

// interrupt only every 1ms
Expand Down
7 changes: 0 additions & 7 deletions src/driver/stm32/time.c
Original file line number Diff line number Diff line change
Expand Up @@ -28,8 +28,6 @@ static void debug_time_init() {
}

void time_init() {
SystemCoreClockUpdate();

#ifndef STM32H7
__HAL_RCC_PWR_CLK_ENABLE();
#endif
Expand All @@ -46,11 +44,6 @@ void SysTick_Handler() {
systick_val = SysTick->VAL;
systick_pending = 0;
(void)(SysTick->CTRL);

#ifdef USE_HAL_DRIVER
// used by the HAL for some timekeeping and timeouts, should always be 1ms
HAL_IncTick();
#endif
}

uint32_t time_micros_isr() {
Expand Down
141 changes: 0 additions & 141 deletions src/system/at32f435/at32f435_437_clock.c

This file was deleted.

45 changes: 0 additions & 45 deletions src/system/at32f435/at32f435_437_clock.h

This file was deleted.

Loading

0 comments on commit b851c32

Please sign in to comment.