2012-02-17 08:37 AM
We use a strategy to wake up the STM32F103 from standby mode by means of the wakeup pin and/or from the RTC alarm. In our implementation it appears that the wakeup from the RTC alarm does occur when the wakeup pin is in a high state during standby. When the wakeup pin is in a low state this functions perfectly. Is it possible to have a wakeup from standby with the wakeup pin enabled and in a high state during standby? What are the necessary conditions to achieve this?
#stm32l151-standby-wakeup #rtc-standby-wakeup #wakeyp #rtc-alarm #standby2012-10-10 04:31 AM
PWR_FlashPowerDownCmd(ENABLE);
ConfigRTCWakeup(u32Temp);
PWR_WakeUpPinCmd(ENABLE); /* Enable wake from WKUP pin*/
EXTI->PR = 0x007FFFFF; // Clear any pending EXTI interrupts
PWR->CR |= PWR_CR_CWUF; // In case the pin was high already
for(t=0;t<200; t++) // This delay doesn't fix it
;
PWR_EnterSTANDBYMode();
Any ideas please?
Paul Burke
2012-10-24 09:04 AM
2012-10-29 03:21 AM
I can confirm that the same happens on the F407. Same problem: when the wake-up line is asserted going to standby, the STM32 then requires a power cycle before coming back to life.
Anybody aware of a workaround or is this a silicon bug?
Sorry, previous post had some formatting errors...
2013-02-25 02:23 AM
Hi all,
For F1, this is the expected result as it is aligned with the wakeup logic explained in the reference manual (RM0008).
In fact, the MCU exists the Standby mode when a rising edge is detected on the WKUP pin or the RTC alarm. If the WKUP pin is high during the Standby mode, it will not be possible to detect the rising edge.
This is not a bug.With F2 and F4, there is a new implementation that adds a wakeup event if the WKUP pin is already high (see RM0090 and RM0033). But this shouldn’t lead to the fact that MCU remains in standby mode as you described previously. I need to re-check this and I’ll go back to you with farmer details.
Best Regards, ST.MCUTo give better visibility on the answered topics, please click on Accept as Solution on the reply which solved your issue or answered your question.
2013-02-25 02:36 AM
@Pirow: I need more details on your use-case: is it similar to Paul's one? do you mean that only the external reset brings the MCU to run mode?
Thanks, ST.MCUTo give better visibility on the answered topics, please click on Accept as Solution on the reply which solved your issue or answered your question.
2013-03-04 06:17 AM
2013-03-04 06:25 AM
2013-03-05 12:36 AM
Hi Brian,
Did you tried to disable the IWDG? Do you get the same result? Best Regards, ST.MCUTo give better visibility on the answered topics, please click on Accept as Solution on the reply which solved your issue or answered your question.
2013-03-05 01:14 AM
Hi, The problem existed before I had enabled the IWDG. We had hoped to avoid using the watchdog as our sleep periods are around 1 minute and the 28 seconds adds at least one extra
wakeup per minute.I'm hoping to get some time this week to go back to basics and build a cut down project based on one of the peripheral library examples that I can use to experiment as the full project I have now is too large to share.One test result I saw yesterday that I want to confirm with this is as follows.I hold PE6 (WKUP3) high while the firmware does its shutdown process and had a pulse stream going into PA0 (WKUP1). While WKUP3 was held high this blocked WKUP1 and the RTC events, but as soon as I let WKUP3 go low I got a wakeup event from WKUP1.I had previously thought that I had to wait until the next IWDG to fire before the problem cleared, and I had just added in a call to disable all IRQs prior to enabling the wakeup pins so need to check if this is the reason for the change, or if it was just a fluke.I'm sure that if there was a silicon problem with this device it would have been seen by now so must be some form of configuration issue that I'm encountering hence the need for a simplified test platform to remove any possible cause from other configurations in the project.When the device starts I use both pins as an EXTI interrupt source, and although it does not say so in the documentation I have also tried to reset these to using AFIO0 prior to enabling the wakeup mode on them in case it was a pending ISR that was causing the wakeup block.I'll post my results as I find them.