I am trying to use K21 USB in device mode, my need is to wakeup device(K21) on asynchronous data interrupt from host(PC).
I am using following settings:
/* Suspend USB */
USB0_USBCTRL |= USB_USBCTRL_SUSP_MASK;
/* Delay 5 sec */
/* Asynchronous Resume Interrupt Enable */
USB0_USBTRC0 |= USB_USBTRC0_USBRESMEN_MASK;
I observed that after enabling "Asynchronous Resume Interrupt" the device is not allowing MCU to go in VLPS mode.
Are these correct settings? How can we use asynchronous data interrupt to wakeup k21 in device mode?