I've got an STM32F103CBU6 running with an external RTC-Cristal (32.768kHz). In my application, the MCU should periodically wake-up from Standby-Mode (10s interval) but also sporadically by an external event which generates a positive edge on the WKUP-Pin. The 10 second interval should not be affected by this additional Wake-Up impulse.
However, I've got the problem, that every time an external Wake-Up occurs, the RTC-Counter creates a delay (ca. 300ms). The clock source of the RTC doesn't matter (LSE or LSI).
MCU wakes up by an RTC alarm at a counter value of 10.
10s later it wakes up on a counter value of 20.
Now an external wake-up occurs (e.g. at a RTC-counter value of 23)
Theoretically next time it should wake up on 30, but in reality, it wakes up on 30.3s (ca. 300ms delayed).
After that it continues 10s later (counter value: 40) but 40.3s in reference to the beginning.
In the application note AN2629 on page 17, Figure 3 (see attachment) you can see that the "RTC_Alarm" and the "WKP_STDBY" theoretically should be handled the same (OR-Gate).
Does someone know what can cause this problem and how I can solve it?
Note: Jumper J1 in the schematic is closed.