mirror of
https://gitee.com/mirrors_PX4/PX4-Autopilot.git
synced 2026-05-01 03:34:07 +08:00
STM32 PM update
git-svn-id: https://nuttx.svn.sourceforge.net/svnroot/nuttx/trunk@5002 7fd9a85b-ad96-42d3-883c-3090e2eb8679
This commit is contained in:
parent
5c1574e66c
commit
7cf644f6a6
@ -100,7 +100,7 @@ void stm32_pmsleep(bool sleeponexit)
|
||||
{
|
||||
regval &= ~NVIC_SYSCON_SLEEPONEXIT;
|
||||
}
|
||||
|
||||
|
||||
putreg32(regval, NVIC_SYSCON);
|
||||
|
||||
/* Sleep until the wakeup interrupt or event occurs */
|
||||
@ -108,10 +108,10 @@ void stm32_pmsleep(bool sleeponexit)
|
||||
#ifdef CONFIG_PM_WFE
|
||||
/* Mode: SLEEP + Entry with WFE */
|
||||
|
||||
__asm("wfe");
|
||||
asm("wfe");
|
||||
#else
|
||||
/* Mode: SLEEP + Entry with WFI */
|
||||
|
||||
__asm("wfi");
|
||||
asm("wfi");
|
||||
#endif
|
||||
}
|
||||
|
||||
@ -162,7 +162,7 @@ void stm32_clockconfig(void)
|
||||
************************************************************************************/
|
||||
|
||||
#ifdef CONFIG_PM
|
||||
void stm32_clockenable(void);
|
||||
void stm32_clockenable(void)
|
||||
{
|
||||
#if defined(CONFIG_ARCH_BOARD_STM32_CUSTOM_CLOCKCONFIG)
|
||||
|
||||
|
||||
@ -288,7 +288,7 @@ static void up_idlepm(void)
|
||||
|
||||
if (oldstate == PM_STANDBY)
|
||||
{
|
||||
stm32_clockconfig();
|
||||
stm32_clockenable();
|
||||
}
|
||||
}
|
||||
break;
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user