File tree Expand file tree Collapse file tree 3 files changed +15
-0
lines changed
TARGET_STM32F4/TARGET_STM32F401xE/device Expand file tree Collapse file tree 3 files changed +15
-0
lines changed Original file line number Diff line number Diff line change 46
46
#define TIM_MST TIM5
47
47
#define TIM_MST_IRQ TIM5_IRQn
48
48
#define TIM_MST_RCC __HAL_RCC_TIM5_CLK_ENABLE()
49
+ #define TIM_MST_DBGMCU_FREEZE __HAL_DBGMCU_FREEZE_TIM5()
49
50
50
51
#define TIM_MST_RESET_ON __HAL_RCC_TIM5_FORCE_RESET()
51
52
#define TIM_MST_RESET_OFF __HAL_RCC_TIM5_RELEASE_RESET()
Original file line number Diff line number Diff line change @@ -148,6 +148,13 @@ HAL_StatusTypeDef HAL_InitTick(uint32_t TickPriority)
148
148
// Enable timer
149
149
HAL_TIM_Base_Start (& TimMasterHandle );
150
150
151
+ #ifndef NDEBUG
152
+ #ifdef TIM_MST_DBGMCU_FREEZE
153
+ // Freeze timer on stop/breakpoint
154
+ TIM_MST_DBGMCU_FREEZE ;
155
+ #endif
156
+ #endif
157
+
151
158
#if DEBUG_TICK > 0
152
159
__HAL_RCC_GPIOB_CLK_ENABLE ();
153
160
GPIO_InitTypeDef GPIO_InitStruct ;
Original file line number Diff line number Diff line change @@ -118,6 +118,13 @@ HAL_StatusTypeDef HAL_InitTick(uint32_t TickPriority)
118
118
__HAL_TIM_SET_COMPARE (& TimMasterHandle , TIM_CHANNEL_2 , PreviousVal + HAL_TICK_DELAY );
119
119
__HAL_TIM_ENABLE_IT (& TimMasterHandle , TIM_IT_CC2 );
120
120
121
+ #ifndef NDEBUG
122
+ #ifdef TIM_MST_DBGMCU_FREEZE
123
+ // Freeze timer on stop/breakpoint
124
+ TIM_MST_DBGMCU_FREEZE ;
125
+ #endif
126
+ #endif
127
+
121
128
#if DEBUG_TICK > 0
122
129
__HAL_RCC_GPIOB_CLK_ENABLE ();
123
130
GPIO_InitTypeDef GPIO_InitStruct ;
You can’t perform that action at this time.
0 commit comments