Content originally posted in LPCWare by giedrius on Thu Oct 24 03:09:08 MST 2013
Hi,
First I would like to ask for more details (comments, links, examples, references, your experience) regarding the topic in general, that is waking up from power saving mode (e.g. power down) on USB activity.
And now to get to the point:
I am developing power sensitive device (meaning it will run on batteries). This device has USB CDC interface for configuration and communication. Most of the time it will spend in power down mode and wait for interrupts such as GPIO or watchdog interrupts, then wake up, do some processing and then go to power down again. But it also needs to wake up when it is connected to the USB port.
Users manual mentions USBWakeup_IRQ interrupt which triggers on USB activity, however I was not able to trigger it (it actually triggers once, just after I call NVIC_EnableIRQ(USBWakeup_IRQn), but never again). So I was wondering what is included in the definition of USB activity? Can (and should) this interrupt trigger when I physically attach my device to the USB port? Or is it only triggered by the USB messages? I am assuming it should trigger on physical activity rather than messages, because during the power down mode the USB peripheral is off. So all in all what are the proper steps (and registers) that should be taken to go from active to power-down mode and then resuming from power-down to active mode after the device is attached to the USB port.
Thank you for any input or advice,
Giedrius