[STM32F4] stm32f407 使用keil自带的RTX系统中无法使用standby进入低功耗

[复制链接]
1857|0
 楼主| longxiang7777 发表于 2014-8-19 10:36 | 显示全部楼层 |阅读模式
使用keil自带的RTX系统中无法使用standby进入低功耗
  RCC_APB1PeriphClockCmd(RCC_APB1Periph_PWR, ENABLE);
  PWR_WakeUpPinCmd(ENABLE);
  PWR_EnterSTANDBYMode();

void PWR_EnterSTANDBYMode(void)
{
  /* Clear Wakeup flag */
  PWR->CR |= PWR_CR_CWUF;
  
  /* Select STANDBY mode */
  PWR->CR |= PWR_CR_PDDS;
  
  /* Set SLEEPDEEP bit of Cortex System Control Register */
  SCB->SCR |= SCB_SCR_SLEEPDEEP_Msk;进入这里就出现HardFault_Handler错误
  
/* This option is used to ensure that store operations are completed */
#if defined ( __CC_ARM   )
  __force_stores();
#endif
  /* Request Wait For Interrupt */
  __WFI();
}
求大神啊!!!!!!
您需要登录后才可以回帖 登录 | 注册

本版积分规则

1

主题

1

帖子

0

粉丝
快速回复 在线客服 返回列表 返回顶部