- Remove calls to HAL_SuspendTick and HAL_ResumeTick
- Rename stm_common.c in hal_tick_common.c
pull/7106/head
bcostm 2018-06-05 14:48:54 +02:00
parent 74c29cb0e5
commit e09e1147d8
4 changed files with 0 additions and 15 deletions

View File

@ -57,8 +57,6 @@
#define HAL_TICK_DELAY (1000) // 1 ms
void HAL_SuspendTick(void);
#ifdef __cplusplus
}
#endif

View File

@ -57,8 +57,6 @@
#define HAL_TICK_DELAY (1000) // 1 ms
void HAL_SuspendTick(void);
#ifdef __cplusplus
}
#endif

View File

@ -35,8 +35,6 @@
#include "mbed_critical.h"
#include "mbed_error.h"
extern void HAL_SuspendTick(void);
extern void HAL_ResumeTick(void);
extern void rtc_synchronize(void);
/* Wait loop - assuming tick is 1 us */
@ -139,12 +137,8 @@ void hal_sleep(void)
// Disable IRQs
core_util_critical_section_enter();
// Stop HAL tick to avoid to exit sleep in 1ms
HAL_SuspendTick();
// Request to enter SLEEP mode
HAL_PWR_EnterSLEEPMode(PWR_MAINREGULATOR_ON, PWR_SLEEPENTRY_WFI);
// Restart HAL tick
HAL_ResumeTick();
// Enable IRQs
core_util_critical_section_exit();
@ -155,8 +149,6 @@ void hal_deepsleep(void)
// Disable IRQs
core_util_critical_section_enter();
// Stop HAL tick
HAL_SuspendTick();
uint32_t EnterTimeUS = us_ticker_read();
// Request to enter STOP mode with regulator in low power mode
@ -185,9 +177,6 @@ void hal_deepsleep(void)
// Verify Clock Out of Deep Sleep
ForceClockOutofDeepSleep();
// Restart HAL tick
HAL_ResumeTick();
// After wake-up from STOP reconfigure the PLL
SetSysClock();