<div dir="ltr"><div dir="ltr"><div>HI, ALL!</div><div>why the code stuck in wakeup handler while the RTC gets time work fine</div><div>i have checked some days, but no register error found, i suspect that the handler function is the issue<br></div><div><br></div><div><br></div><div>// code <br></div><div>rtems_isr rtc_wakeup_handler(rtems_vector_number vector)<br>{<br>    <br>    uint32_t STM32F4_RTC_ISR = (*(volatile uint32_t *)(0x4000280C));<br>    <br>    // clear 10bit<br>    if(STM32F4_RTC_ISR & (1<<10))<br>    {<br>        //printk("wak\n");<br>        STM32F4_RTC_ISR &= ~(1<<10);<br>        STM32F4_RTC_ISR &= 0xfffffbff;<br>    }<br>    <br>    volatile uint32_t EXIT_PR = *(volatile uint32_t*)0x40013C14;<br>    printk("before clr %08x\n", EXIT_PR);<br>    EXIT_PR |= 1<<22;<br>    <br>    int i;<br>    for(i = 0; i < 1000; i++) i = i + 1 - 1;<br>    printk(" %08x\n", EXIT_PR);<br>}</div><div><br></div><div><br></div><div>the printed log attached,  why the EXIT_PR bit22 not cleared<br></div><div><br></div><div><br></div></div></div>