File tree Expand file tree Collapse file tree 2 files changed +4
-6
lines changed Expand file tree Collapse file tree 2 files changed +4
-6
lines changed Original file line number Diff line number Diff line change @@ -148,12 +148,11 @@ 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
151
// Freeze timer on stop/breakpoint
152
+ // Define the FREEZE_TIMER_ON_DEBUG macro in mbed_app.json for example
153
+ #if !defined(NDEBUG ) && defined(FREEZE_TIMER_ON_DEBUG ) && defined(TIM_MST_DBGMCU_FREEZE )
154
154
TIM_MST_DBGMCU_FREEZE ;
155
155
#endif
156
- #endif
157
156
158
157
#if DEBUG_TICK > 0
159
158
__HAL_RCC_GPIOB_CLK_ENABLE ();
Original file line number Diff line number Diff line change @@ -118,12 +118,11 @@ 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
121
// Freeze timer on stop/breakpoint
122
+ // Define the FREEZE_TIMER_ON_DEBUG macro in mbed_app.json for example
123
+ #if !defined(NDEBUG ) && defined(FREEZE_TIMER_ON_DEBUG ) && defined(TIM_MST_DBGMCU_FREEZE )
124
124
TIM_MST_DBGMCU_FREEZE ;
125
125
#endif
126
- #endif
127
126
128
127
#if DEBUG_TICK > 0
129
128
__HAL_RCC_GPIOB_CLK_ENABLE ();
You can’t perform that action at this time.
0 commit comments