You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
* us_ticker timestamp until the us_ticker context is restored. */
237
224
mbed_sdk_inited=0;
238
225
239
-
/* We've seen unstable PLL CLK configuration when DEEP SLEEP exits just few µs after being entered
240
-
* So we need to force clock init out of Deep Sleep.
241
-
* This init has been split into 2 separate functions so that the involved structures are not allocated on the stack in parallel.
242
-
* This will reduce the maximum stack usage in case on non-optimized / debug compilers settings
243
-
*/
244
-
ForceOscOutofDeepSleep();
245
-
ForcePeriphOutofDeepSleep();
246
-
247
226
/* After wake-up from STOP reconfigure the PLL */
248
227
#if defined(DUAL_CORE)
249
-
while (LL_HSEM_1StepLock(HSEM, CFG_HW_RCC_SEMID)) {
228
+
/* CFG_HW_STOP_MODE_SEMID is used to protect read access to STOP flag, and this avoid both core to configure clocks if both exit from stop at the same time */
229
+
while (LL_HSEM_1StepLock(HSEM, CFG_HW_STOP_MODE_SEMID)) {
250
230
}
251
231
252
-
if ((LL_RCC_GetSysClkSource() ==LL_RCC_SYS_CLKSOURCE_STATUS_HSI)) {
253
-
LL_PWR_ClearFlag_CPU();
232
+
/* Clocks need to be reconfigured only if system has been in stop mode */
233
+
if (LL_PWR_CPU_IsActiveFlag_STOP() &&LL_PWR_CPU2_IsActiveFlag_STOP()) {
234
+
/* We've seen unstable PLL CLK configuration when DEEP SLEEP exits just few µs after being entered
235
+
* So we need to force clock init out of Deep Sleep.
236
+
* This init has been split into 2 separate functions so that the involved structures are not allocated on the stack in parallel.
237
+
* This will reduce the maximum stack usage in case on non-optimized / debug compilers settings
238
+
*/
239
+
while (LL_HSEM_1StepLock(HSEM, CFG_HW_RCC_SEMID)) {
0 commit comments