move TIM_TIME_BASE to common region of main.h

This commit is contained in:
Oskar Weigl
2018-03-16 17:56:19 -07:00
parent 3aea04723d
commit 2b2ed19ab2
+2 -1
View File
@@ -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))