Hello Ian,
USB0_IRQHandler must be reserved for USB stack and should not be modified by user.
If you want to enable sleep interrupt, then, as you already saw, you need to enable suspend option on usb_device_config.h:
/* Advance suspend resume */
#define USBCFG_DEV_ADVANCED_SUSPEND_RESUME (1)
After that, all suspend events will be attend on USB_Device_callback (where other events such as bus reset, enumeration complete, among others are handled), for this basic example, I print on console that suspend event is received and increment a counter:
case USB_DEV_EVENT_SUSPEND:
suspend_times++;
USB_PRINTF("SUSPEND MODE: %d\r\n", suspend_times);
break;
case USB_DEV_EVENT_ENUM_COMPLETE: /* Device enumerated process complete */
/* Write your code here ... */
break;
This is all you need to do in order to enable sleep interrupt on USB stack from KSDK 1.3
I hope this helps!
Regards,
Isaac