USB_HID_SET_REPORT_REQUEST does not work correctly

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

USB_HID_SET_REPORT_REQUEST does not work correctly

1,150 Views
dankarm
Contributor II

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)

 

Line
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(

 

Dan

Labels (1)
0 Kudos
6 Replies

686 Views
ivadorazinova
NXP Employee
NXP Employee

Hello Dan,

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!

Iva

0 Kudos

686 Views
NicolasP
Contributor IV

Hi,

Dan, your fix is very interresting. I use it in KSDK1.2.0 and KBOOT 1.2.0.

Iva, is it possible to get the official fix ?

Best regards,

Nicolas

0 Kudos

686 Views
ivadorazinova
NXP Employee
NXP Employee

Hi Nicolas,

yes - it will be fixed in KSDK 1.3.

Have a nice day!

Iva

0 Kudos

686 Views
NicolasP
Contributor IV

Hi Iva,

Any schedule for V1.3 release ?

I have other issues with USB HID. Is there a list of fixes in V1.3 ?

Best regards,

Nicolas

0 Kudos

686 Views
ivadorazinova
NXP Employee
NXP Employee

Hi Nicolas,

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.

Iva

0 Kudos

686 Views
ivadorazinova
NXP Employee
NXP Employee

Hello Dan K,

thank you for your feedback, I will test it on my side and let you know my results.

Best Regards,

Iva

0 Kudos