Thank you for your feedback and explanation.
The line 0U != (lpc3511IpState->registerBase->DEVCMDSTAT & BIT17) is on line 2706 in the usb_device_lpcip3511.c file.
I built my project based on the dev_hid_mouse_bm sample.
Without any changes, this sample works perfectly.
0x06, 0xA0, 0xFF, // Usage Page (Vendor Defined 0xFFA0)
0x09, 0x00, // Usage (0x00)
0xA1, 0x01, // Collection (Application)
0x09, 0x01, // Usage (0x01)
0x15, 0x00, // Logical Minimum (0)
0x26, 0xFF, 0x00, // Logical Maximum (255)
0x75, 0x08, // Report Size (8)
0x95, 0x40, // Report Count (64)
0x81, 0x02, // Input (Data,Var,Abs,No Wrap,Linear,Preferred State,No Null Position)
0x09, 0x02, // Usage (0x02)
0x91, 0x02, // Output (Data,Var,Abs,No Wrap,Linear,Preferred State,No Null Position,Non-volatile)
0xC0, // End Collection
The device enters the suspend state after a successful enumeration, even though I set two endpoints (1 and 2) for interrupt IN/OUT transfer.
According to the recent results from my end, it seems like the host somehow suspends it. Before the suspension, there are no USB transfers in the USB1, which means the register info is correct.
Do I need to write 0 to the Suspend bit (DSUS) as a workaround to keep the device awake when it enters the suspend state?
Also, I will encounter the same issue when I use "usb_device_hid_generic" sample code.
I am wondering why a USB device with only a user-defined page in the HID descriptor has this phenomenon.
Thanks for your quick reply.
BR,
Peter Tseng