File tree Expand file tree Collapse file tree 1 file changed +20
-6
lines changed
targets/TARGET_STM/TARGET_STM32G0 Expand file tree Collapse file tree 1 file changed +20
-6
lines changed Original file line number Diff line number Diff line change 2
2
* SPDX-License-Identifier: BSD-3-Clause
3
3
******************************************************************************
4
4
*
5
- * Copyright (c) 2017 STMicroelectronics.
5
+ * Copyright (c) 2017 STMicroelectronics.
6
6
* All rights reserved.
7
7
*
8
8
* This software component is licensed by ST under BSD 3-Clause license,
9
- * the "License"; You may not use this file except in compliance with the
9
+ * the "License"; You may not use this file except in compliance with the
10
10
* License. You may obtain a copy of the License at:
11
11
* opensource.org/licenses/BSD-3-Clause
12
12
*
16
16
#define __US_TICKER_DATA_H
17
17
18
18
#ifdef __cplusplus
19
- extern "C" {
19
+ extern "C" {
20
20
#endif
21
21
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()
33
35
34
36
#define TIM_MST_BIT_WIDTH 32 // 16 or 32
35
37
36
- #define TIM_MST_PCLK 1 // Select the peripheral clock number (1 or 2)
38
+ #else // TIM2_BASE
39
+
40
+ #define TIM_MST TIM3
41
+ #define TIM_MST_IRQ TIM3_IRQn
42
+ #define TIM_MST_RCC __TIM3_CLK_ENABLE()
43
+ #define TIM_MST_DBGMCU_FREEZE __HAL_DBGMCU_FREEZE_TIM3()
44
+
45
+ #define TIM_MST_RESET_ON __TIM3_FORCE_RESET()
46
+ #define TIM_MST_RESET_OFF __TIM3_RELEASE_RESET()
37
47
48
+ #define TIM_MST_BIT_WIDTH 16 // 16 or 32
49
+
50
+ #endif // TIM2_BASE
51
+
52
+ #define TIM_MST_PCLK 1 // Select the peripheral clock number (1 or 2)
38
53
39
54
#ifdef __cplusplus
40
55
}
41
56
#endif
42
57
43
58
#endif // __US_TICKER_DATA_H
44
-
You can’t perform that action at this time.
0 commit comments