Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Use more efficient mode for STM32L4XX stop mode#1097

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to ourterms of service andprivacy statement. We’ll occasionally send you account related emails.

Already on GitHub?Sign in to your account

Merged
fpistm merged 8 commits intostm32duino:masterfromangelnu:master
Jul 3, 2020
Merged
Changes fromall commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 14 additions & 2 deletionslibraries/SrcWrapper/src/stm32/low_power.c
View file
Open in desktop
Original file line numberDiff line numberDiff line change
Expand Up@@ -223,12 +223,24 @@ void LowPower_stop(serial_t *obj)
HAL_PWREx_EnableFastWakeUp();
#endif
#ifdef__HAL_RCC_WAKEUPSTOP_CLK_CONFIG
/* Select HSI as system clock source after Wake Up from Stop mode */
/* Select MSI or HSI as system clock source after Wake Up from Stop mode */
#ifdefRCC_STOP_WAKEUPCLOCK_MSI
__HAL_RCC_WAKEUPSTOP_CLK_CONFIG(RCC_STOP_WAKEUPCLOCK_MSI);
#else
__HAL_RCC_WAKEUPSTOP_CLK_CONFIG(RCC_STOP_WAKEUPCLOCK_HSI);
#endif
#endif

/* Enter Stop mode */
HAL_PWR_EnterSTOPMode(PWR_LOWPOWERREGULATOR_ON,PWR_STOPENTRY_WFI);
#if defined(STM32L4xx)
if ((WakeUpUart==NULL)|| (WakeUpUart->Instance== (USART_TypeDef*)LPUART1_BASE)) {
// STM32L4xx supports STOP2 mode which halves consumption
HAL_PWREx_EnterSTOP2Mode(PWR_STOPENTRY_WFI);
}else
#endif
{
HAL_PWR_EnterSTOPMode(PWR_LOWPOWERREGULATOR_ON,PWR_STOPENTRY_WFI);
}

/* Exit Stop mode reset clocks */
SystemClock_ConfigFromStop();
Expand Down

[8]ページ先頭

©2009-2025 Movatter.jp