Skip to main content
Visitor II
February 16, 2022
Question

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

  • February 16, 2022
  • 0 replies
  • 888 views

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);

}

    This topic has been closed for replies.