Hi Alice,
Thank you very much for the detail guide you provided.
After some study and work, now I can make a gamepad with 1 button to work by merge GPIO/LED and USB HID MOUSE example, but I still have some question and hope you can help, thank you
1. USB performance (code structure?)
The GPIO/LED example implement the GPIO read/write in the while() in main, so if I merge the same code in USB HID mouse, I found the button action will read after USB_DeviceHidMouseAction done, not parallel run, it will cause button action may missed or response slow, if I put the GPIO code in USB_DeviceHidMouseAction, it may cause USB timeout, what is the good way to implement USB+IO? or use RTOS?
2. USB code implementation
The USB HID mouse always report because the code is implemented using polling, I hope handle GPIO as interrupt, and only send report when interrupt happened, so I try not to call USB_DeviceHidSend if no button status changed in USB_DeviceHidMouseAction, and usb interface seems not work anymore.
So the question is, how to make USB report on demand?
3. USB power management
I see the LPC MCU have several power mode, but what is the lowest power mode for LPC usb device? if means if no gamepad action, can MCU enter this mode, and wakeup when gamepad button/joystick pressed? It may be able to implemented in timer , or USB "selective suspend". (I see your similar Q&A, power consumption, studying)
Consider question 1 and 2 and 3, are there any related example code and document about LPCXpresso USB library?
4. Thank you for provide flashmagic tool and I will study it, but The chapter3 introduce the architecture only, no more information about making those images and production line HOW-TOs.
I would like to know are there any MXP official release tool and document related? I can found some related information e.g MCUBOOT, which can't found in 51u68 product page, don't know whether or not it can this, even know whether it is 51u58 compatible. those resources you may know after you search the long post, otherwise, no one knows.
OM40005 have an additional chip call DFU to do it, but it will not exist for production, I hope I can simulate production phase on OM40005 but how to? I don't know why not do DFU with 51u68 only?
Regards
Andy