cancel
Showing results for 
Search instead for 
Did you mean: 

How to get into Standby Mode Simply

bruce
Associate II
Posted on September 13, 2008 at 19:53

How to get into Standby Mode Simply

2 REPLIES 2
bruce
Associate II
Posted on May 17, 2011 at 12:44

I believe I've boiled this down to a problem with my GCC toolchain.

See my more recent post where I show that it works fine using IAR4.42, but not GCC 4.2.0.

bruce
Associate II
Posted on May 17, 2011 at 12:44

I'm having trouble getting my stm32f101 into standby. Once there, I plan on waking up via a keypress on the wakeup pin, PA0.

While the example code uses the RTC and EXTI, I would like to do something simpler.

I tried:

/* Enable PWR clock and wakeup pin */

RCC_APB1PeriphClockCmd(RCC_APB1Periph_PWR, ENABLE);

PWR_WakeUpPinCmd(ENABLE);

myprintf (''entering standby mode after 2 seconds\r\n'');

PWR_EnterSTANDBYMode();

When I run this, it appears to crash at this point, the oscillator stays running at full speed (HSI at 36mhz), I have a heartbeat LED driven off Timer1 IRQ and that keeps running. And a rising edge on PA0 doesn't do anything to get me out of this.

What additional setup do I need to do to get into standby?

My system only uses two interrupts (USART and Timer, both at priority 0 -- is this a problem?)

Thanks