Hi,
In progress with a project where we are using K20 100 MHz device (rev1.4), battery powered and connectable via USB to a computer/charger.
We are using WAIT, STOP and Low Leakage STOP for power saving, but when we are connected via USB, we must use WAIT mode to maintain the USB connection. Since this mode draws considerably much more power than any STOP mode, we are investigating ways to idle more efficiently (the operating system is in its 'idle' thread for almost 100% of the time when connected to a host).
We have two external crystals, 32kHz and 16 MHz.
Is there a way to have USB fully functional also in STOP mode, or is there any other preferred way of power saving while USB connected?
Thanks for any pointers in this matter!
Staffan
Hello Staffan!
Please let us know how is the project going, we'd like to know!
Best regards,
Monica.
Sorry for the delay - will post again as soon as possible when more investigations have been carried out.
Best regards
Staffan
There is an Asynchronous Resume Interrupt avaiable for USB module, so when the device is in STOP mode or VLPS mode,
it can asynchronously detects K-state using the unfiltered state of the D+ and D- pins. so that it can wake up the system from STOP/VLPS mode. I think you may use this feature for your case. Please enable the resume interrupt as well as the bit of USBx_USBTRC0[USBRESMEN] before entering low power mode.
Hope that helps,
How exactly is this supposed to work? When the USB host issues the resume, will it automatically wake the MCU up and put it back into run mode? I've had no luck with that, but I'm using a KL25. There is already code in the stack with the #ifdef USB_LOWPOWERMODE to do this, but it seems to break the enumeration process.
Hi Kan,
Sorry for the late reply! From my understanding, this interrupt is only useable when waking up from suspended state of the USB bus. I am anyway implementing this to be able to sleep also at these occasions, but I believe that this will only affect the power consumption when my device is in 'suspended' state. What I am looking for is a way to diminish power consumption also when the device is in 'configured' state.
As soon as I have verified this, I will post about my progress!
Best regards,
Staffan