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.
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
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!
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.
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.