mbed library sources. Supersedes mbed-src. Fixed broken STM32F1xx RTC on rtc_api.c

Dependents:   Nucleo_F103RB_RTC_battery_bkup_pwr_off_okay

Fork of mbed-dev by mbed official

Revision:
175:af195413fb11
Parent:
174:b96e65c34a4d
diff -r b96e65c34a4d -r af195413fb11 targets/TARGET_STM/hal_tick_32b.c
--- a/targets/TARGET_STM/hal_tick_32b.c	Mon Oct 02 15:33:19 2017 +0100
+++ b/targets/TARGET_STM/hal_tick_32b.c	Wed Oct 11 12:45:49 2017 +0100
@@ -118,12 +118,11 @@
     __HAL_TIM_SET_COMPARE(&TimMasterHandle, TIM_CHANNEL_2, PreviousVal + HAL_TICK_DELAY);
     __HAL_TIM_ENABLE_IT(&TimMasterHandle, TIM_IT_CC2);
 
-#ifndef NDEBUG
-#ifdef TIM_MST_DBGMCU_FREEZE
     // Freeze timer on stop/breakpoint
+    // Define the FREEZE_TIMER_ON_DEBUG macro in mbed_app.json for example
+#if !defined(NDEBUG) && defined(FREEZE_TIMER_ON_DEBUG) && defined(TIM_MST_DBGMCU_FREEZE)
     TIM_MST_DBGMCU_FREEZE;
 #endif
-#endif
 
 #if DEBUG_TICK > 0
     __HAL_RCC_GPIOB_CLK_ENABLE();