mirror of
https://github.com/odriverobotics/ODrive.git
synced 2026-08-20 22:14:34 +08:00
move TIM_TIME_BASE to common region of main.h
This commit is contained in:
@@ -69,7 +69,6 @@
|
||||
#define TIM_APB1_CLOCK_HZ 84000000
|
||||
#define TIM_APB1_PERIOD_CLOCKS 4096
|
||||
#define TIM_APB1_DEADTIME_CLOCKS 40
|
||||
#define TIM_TIME_BASE TIM14
|
||||
|
||||
|
||||
#define M0_nCS_Pin GPIO_PIN_13
|
||||
@@ -157,6 +156,8 @@
|
||||
/* USER CODE BEGIN Private defines */
|
||||
#endif
|
||||
|
||||
#define TIM_TIME_BASE TIM14
|
||||
|
||||
#define CURRENT_MEAS_PERIOD ((float)(2*TIM_1_8_PERIOD_CLOCKS)/(float)TIM_1_8_CLOCK_HZ)
|
||||
#define CURRENT_MEAS_HZ (TIM_1_8_CLOCK_HZ/(2*TIM_1_8_PERIOD_CLOCKS))
|
||||
|
||||
|
||||
Reference in New Issue
Block a user