2010-06-02 01:25 PM
Another stop mode question
2011-05-17 04:53 AM
STANDBY is the lowest power mode the RTC ALARM and WKUP will bring it back. It can also be exited with the Watchdog Reset as is I recall, which would permit fractions of a second.
12-bit down counter off 40 KHz LSI, at /256 the max timeout is about 26 seconds, at /4 the minimum tick is 100 us, so 100 ticks would be 10ms.2011-05-17 04:53 AM
Yes I have seen that CPU can exit STANDBY mode through IWDG RESET according to table 8. 4.3 RM. But this will make the CPU reset right? I'm not sure we want that. But am I right that the CPU can only exit STOP mode through the RTC alarm?
Thanks for the information so far. BR Jens2011-05-17 04:53 AM
As I understand it you can exit STOP via *ANY* EXTI, there are at least 16 other pins/sources you can monitor, including USART / TIMER input pins.
Yes the watchdog resets the processor, that might not fit into your implementation model, but certainly is a viable method. Sure you have to turn peripherals off, and then back on later, but it's that where the real power is going anyway? Also consider using WFI, it is the equivalent to the classic HALT implementation when the processor idles until the next interrupt. The peripherals keep running, and you can set up a 10ms (or whatever) ticker. Clock the part at the slowest rate you application will permit.2011-05-17 04:53 AM
Hello,
Yes by using WFI CPU wakes up from STOP mode when the systick interrupt occurs. Thanks2011-05-17 04:53 AM
As I wrote in the earlier comment, CPU wakes up from stop mode on the systick interrupt. BUT only if I have the Jtag debugger connected to target.
If I run the target with power supply only, it seems that systick is never enabled. Why is that and how can I make the systick work eventhough the debugger is not connected. Many thanks for any help.2011-05-17 04:53 AM
As I wrote in the earlier comment, CPU wakes up from stop mode on the systick interrupt. BUT only if I have the Jtag debugger connected to target.
If I run the target with power supply only, it seems that systick is never enabled. Why is that and how can I make the systick work eventhough the debugger is not connected. Many thanks for any help.2011-05-17 04:53 AM
Hi, SYSTICK interrupt does not wakeup the CPU from stop mode. It is a bug not a feature. You must use RTC instead of SYSTICK. RTC alarm interrupt can wakeup the cpu from stop mode.
Check also for newest errata sheet (debugging stop mode with WFE/WFI entry.2011-05-17 04:53 AM
It's not true . We are using WFI in our OS when we have nothing to do and it's just working. We use it on M3 processor.