cancel
Showing results for 
Search instead for 
Did you mean: 

My code hangs(gets stuck) while debugging at 'RTC_ITConfig(RTC_IT_WUT, ENABLE);'.

ASing.20
Associate II

I am using this code:

void main()

{

CLK_RTCClockConfig(CLK_RTCCLKSource_LSI, CLK_RTCCLKDiv_1);

CLK_PeripheralClockConfig(CLK_Peripheral_RTC, ENABLE);

RTC_WakeUpClockConfig(RTC_WakeUpClock_CK_SPRE_16bits);

RTC_ITConfig(RTC_IT_WUT, ENABLE); <=======================(gets stuck at this line)

enableInterrupts();

RTC_SetWakeUpCounter(5);

RTC_WakeUpCmd(ENABLE);

GPIO_Init(GPIOE, GPIO_Pin_7, GPIO_Mode_Out_PP_Low_Fast);

GPIO_Init(GPIOC, GPIO_Pin_7, GPIO_Mode_Out_PP_Low_Fast);

GPIO_SetBits(GPIOC, GPIO_Pin_7);

Delay(5000);

while(1)

{

 halt();

}

GPIO_SetBits(GPIOE, GPIO_Pin_7);

Delay(5000);

}

0 REPLIES 0