cancel
Showing results for 
Search instead for 
Did you mean: 

Exiting from stop mode

sjackson
Associate II
Posted on January 22, 2008 at 18:44

Exiting from stop mode

7 REPLIES 7
sjackson
Associate II
Posted on May 17, 2011 at 12:21

I have two issues with exiting stop mode.

1) I have my system configured to wake up after detecting an edge on A0 (Wakeup button on STM32 eval board) but it doesn't seem to work correctly until I tell my debugger to pause the system, at which point wakeup takes effect.

2) After waking, I try to print out a message via USB but seem to lock up waiting for the endpoint to be free. I call my function I use to set up system clocks at initial boot up but to no avail. Is there something else that must be done to reactivate USB after stop mode?

Thanks for any help!

16-32micros
Associate III
Posted on May 17, 2011 at 12:21

Hi SJackson,

Correct me if I missed something, you would like to implement STM32 USB with remote wake-up feature in Bus powered mode or something else ? Thx.

STOne-32

sjackson
Associate II
Posted on May 17, 2011 at 12:21

I would like to implement it such that a GPIO configured as an external interrupt will wake the processor up from sleep. After the processor is running again, I would like to use USB to provide status communications to a user's PC. USB itself will not trigger a wake-up.

adrian3
Associate II
Posted on May 17, 2011 at 12:21

Could this have anything to do with what you are seeing?

http://www.stm32circle.com/forum/viewtopic.php?id=19

sjackson
Associate II
Posted on May 17, 2011 at 12:21

I have also noticed that sometimes when I execute the firmware library function to enter stop mode, my debugger stops and shows in disassembly that it is trying to execute code at address 0xFFFFFFFF. If I step through the code a line at a time, execution seemingly jumps to this address as soon as WFI or WFE is executed.

sjackson
Associate II
Posted on May 17, 2011 at 12:21

Quote:

On 18-01-2008 at 09:40, Anonymous wrote:

Could this have anything to do with what you are seeing?

http://www.stm32circle.com/forum/viewtopic.php?id=19

Perhaps it is related. I can usually make low-power work as long as I don't try to do anything fancy in the debugger though.

Does anyone know about resuming USB operation after low power mode without forcing the user to disconnect and reconnect the USB cable? I've tried using Suspend() and Resume(RESUME_EXTERNAL) function calls but they don't seem to do anything; the CPU just sits waiting for an endpoint to become free.

lanchon
Associate III
Posted on May 17, 2011 at 12:21

I don't know the first thing about USB, but maybe the device must remain responsive to the host while it's connected. Take a look here:

http://www.olimex.com/dev/images/ARM/ST/STM32-H103-sch.gif

The PC11 / DISC signal seems to be used to disconnect and reconnect from the host. Maybe you could disconnect before stopping?