Skip to content

Commit e09e114

Browse files
committed
Cleanup
- Remove calls to HAL_SuspendTick and HAL_ResumeTick - Rename stm_common.c in hal_tick_common.c
1 parent 74c29cb commit e09e114

File tree

4 files changed

+0
-15
lines changed

4 files changed

+0
-15
lines changed

targets/TARGET_STM/TARGET_STM32F4/TARGET_STM32F429xI/device/hal_tick.h

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -57,8 +57,6 @@
5757

5858
#define HAL_TICK_DELAY (1000) // 1 ms
5959

60-
void HAL_SuspendTick(void);
61-
6260
#ifdef __cplusplus
6361
}
6462
#endif

targets/TARGET_STM/TARGET_STM32F4/TARGET_STM32F437xG/device/hal_tick.h

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -57,8 +57,6 @@
5757

5858
#define HAL_TICK_DELAY (1000) // 1 ms
5959

60-
void HAL_SuspendTick(void);
61-
6260
#ifdef __cplusplus
6361
}
6462
#endif

targets/TARGET_STM/sleep.c

Lines changed: 0 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -35,8 +35,6 @@
3535
#include "mbed_critical.h"
3636
#include "mbed_error.h"
3737

38-
extern void HAL_SuspendTick(void);
39-
extern void HAL_ResumeTick(void);
4038
extern void rtc_synchronize(void);
4139

4240
/* Wait loop - assuming tick is 1 us */
@@ -139,12 +137,8 @@ void hal_sleep(void)
139137
// Disable IRQs
140138
core_util_critical_section_enter();
141139

142-
// Stop HAL tick to avoid to exit sleep in 1ms
143-
HAL_SuspendTick();
144140
// Request to enter SLEEP mode
145141
HAL_PWR_EnterSLEEPMode(PWR_MAINREGULATOR_ON, PWR_SLEEPENTRY_WFI);
146-
// Restart HAL tick
147-
HAL_ResumeTick();
148142

149143
// Enable IRQs
150144
core_util_critical_section_exit();
@@ -155,8 +149,6 @@ void hal_deepsleep(void)
155149
// Disable IRQs
156150
core_util_critical_section_enter();
157151

158-
// Stop HAL tick
159-
HAL_SuspendTick();
160152
uint32_t EnterTimeUS = us_ticker_read();
161153

162154
// Request to enter STOP mode with regulator in low power mode
@@ -185,9 +177,6 @@ void hal_deepsleep(void)
185177
// Verify Clock Out of Deep Sleep
186178
ForceClockOutofDeepSleep();
187179

188-
// Restart HAL tick
189-
HAL_ResumeTick();
190-
191180
// After wake-up from STOP reconfigure the PLL
192181
SetSysClock();
193182

0 commit comments

Comments
 (0)