Using the latest Freescale Kinetis Software Development Kit (Kinetis SDK 1.2.0), discovered that the USB_HID_SET_REPORT_REQUEST
operation in the example application USB_App_Class_Callback() function (see hid_mouse or hid_keyboard demo_apps examples) does not work correctly. When the USB host sends a "Set Report" request, the "data" pointer referenced is always a NULL.
Investigating this, I determined that there appears to be a problem with the USB_Control_Service() function in the usb_framework.c file. In this function, the local "data" variable is always initialized to NULL and never changed before being passed to a callback function (eventually calling the application's USB_App_Class_Callback() function). I was able to get it to work by adding the following line: (shown in bold)
|448||/* class or vendor request */|
|449||size = event->len + USB_SETUP_PKT_SIZE;|
|data = event->buffer_ptr;||// DLK added this bug fix|
|450||error = usb_fw_ptr->request_notify_callback(|
yes, you are right. I tested it on my side with the same result.
Thank you for your report.
I informed our SW team and they have already worked on this bug and in next release it will be fix.
Many thank for your feedback!
Have a great day!
For these issues will be KSDK 1.3 Release Note, where you find known issues.
This version will be available with KSDK 1.3, by the end of Sep/beginning of Oct.
Hope this helps.