如题,谢谢!
我现在的程序如下,进入halt后就是不能唤醒。
CLK_LSICmd(ENABLE);
/* Enable RTC clock */
CLK_RTCClockConfig(CLK_RTCCLKSource_LSE, CLK_RTCCLKDiv_1);
/* Wait for LSE clock to be ready */
while (CLK_GetFlagStatus(CLK_FLAG_LSERDY) == RESET);
/* wait for 1 second for the LSE Stabilisation */
LSE_StabTime();
CLK_PeripheralClockConfig(CLK_Peripheral_RTC, ENABLE);
/* Configures the RTC wakeup timer_step = RTCCLK/16 = LSE/16 = 488.28125 us */
RTC_WakeUpClockConfig(RTC_WakeUpClock_RTCCLK_Div16);
/* Enable wake up unit Interrupt */
RTC_ITConfig(RTC_IT_WUT, ENABLE);
/* Enable general Interrupt*/
/* RTC wake-up event every 500 ms (timer_step x (1023 + 1) )*/
RTC_SetWakeUpCounter(23);
RTC_WakeUpCmd(ENABLE);
enableInterrupts(); //使能中断
_asm("halt");
_asm("nop");
_asm("nop");
_asm("nop");
此帖出自
小平头技术问答
一周热门 更多>