File tree Expand file tree Collapse file tree 1 file changed +15
-1
lines changed
targets/TARGET_STM/TARGET_STM32G0 Expand file tree Collapse file tree 1 file changed +15
-1
lines changed Original file line number Diff line number Diff line change 22
22
#include "stm32g0xx.h"
23
23
#include "stm32g0xx_ll_tim.h"
24
24
#include "cmsis_nvic.h"
25
-
25
+
26
+ #if defined TIM2_BASE
27
+
26
28
#define TIM_MST TIM2
27
29
#define TIM_MST_IRQ TIM2_IRQn
28
30
#define TIM_MST_RCC __TIM2_CLK_ENABLE()
31
33
#define TIM_MST_RESET_ON __TIM2_FORCE_RESET()
32
34
#define TIM_MST_RESET_OFF __TIM2_RELEASE_RESET()
33
35
36
+ #else
37
+
38
+ #define TIM_MST TIM3
39
+ #define TIM_MST_IRQ TIM3_IRQn
40
+ #define TIM_MST_RCC __TIM3_CLK_ENABLE()
41
+ #define TIM_MST_DBGMCU_FREEZE __HAL_DBGMCU_FREEZE_TIM3()
42
+
43
+ #define TIM_MST_RESET_ON __TIM3_FORCE_RESET()
44
+ #define TIM_MST_RESET_OFF __TIM3_RELEASE_RESET()
45
+
46
+ #endif
47
+
34
48
#define TIM_MST_BIT_WIDTH 32 // 16 or 32
35
49
36
50
#define TIM_MST_PCLK 1 // Select the peripheral clock number (1 or 2)
You can’t perform that action at this time.
0 commit comments