cancel
Showing results for 
Search instead for 
Did you mean: 

USB Lib and Standby, problem on Wakeup

js23
Associate III
Posted on April 27, 2010 at 11:12

USB Lib and Standby, problem on Wakeup

1 REPLY 1
gil2
Associate II
Posted on May 17, 2011 at 13:48

Mine does not wake up from Standby.

I currently do it like this:

...

   // Peripheral Clock - This is done in the init function, but I did it again here

   RCC_APB1PeriphClockCmd(RCC_APB1Periph_PWR,ENABLE);

  

   // Enable WKUP pin

   PWR_WakeUpPinCmd(ENABLE);

   // Insert a delay  - I have also tried without this delay

   Delay(0xFFFF);   // for(; nCount != 0; nCount--);

   // Request to enter STANDBY mode and wake up with rising edge of WKUP pin  

   PWR_EnterSTANDBYMode();

   while(1)  

   {  

     // Infinite loop - It's OK because the system will reset anyways  

   }  

The unit does not wake up (reset).  I've tried with both the JTAG connected and not connected.

Port PA.0 (WKUP pin) has a pull-down resistor, leading to a momentary switch, with Vcc on the other side of the switch, which should be enought to generate the required rising edge when the button is pressed.

Any ideas?  Thanks!