Waking KL24 from VLPW on USB Plug-in

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Waking KL24 from VLPW on USB Plug-in

552 Views
lucianomoretti
Contributor IV

Trying to figure out how to wake the system from VLPW when a USB cable is plugged in. Using the Freescale USB Stack V4.1.1 PEx components with a HID mouse profile.

Looking at KL24 RM 3.3.3.1 "Wake-up Sources" it looks like USB isn't listed. Is there a way to wake the KL24 when it connects to a computer?

Tags (4)
0 Kudos
3 Replies

411 Views
lucianomoretti
Contributor IV

Here's what I found:

There is a bit USBRESMEN in the USB0_USBTRC0 that will wake the processor from VLPW mode enabled (and other modes where the USB subsystem is still powered).  The manual isn't clear on how to use this bit: It says it should only be used when the Transceiver is suspended.  It also does not seem to be supported by the Freescale USB stack PEx components I'm using.

I tried enabling it through the debugger, and it seems to wake the processor when a data connection is detected, but not when a wall wart charger is detected.  Currently, the best solution I can find is to route the +5v USB rail through some adjustments to a ExtInt enabled pin.  This will wake the system whenever power is detected (either from the computer or from the wall wart) and wake the system.

0 Kudos

411 Views
miduo
NXP Employee
NXP Employee

Hi,

Yes, as Bob mentioned, bit USBRESMEN is not for your case as the "power" resume. You should route Vbus to a LLWU pin to detect internal USB regulator vlotage when USB plugged in.

0 Kudos

411 Views
bobpaddock
Senior Contributor III

USBRESMEN  is related to the USB K-state (resume signaling) when the host has put the device to sleep and wants to wake it up later all from the host's perspective.  This can wake the device from its sleep modes, however it is unrelated to USB power in the sense of power modes.  The order this bit is set in relation to setting power mode sleep bits may be important.

This is again the confusion between the two different meanings of 'sleep' in the context of USB and the Freescale manuals. :-(

0 Kudos