USB_HID_SET_REPORT_REQUEST does not work correctly

取消
显示结果 
显示  仅  | 搜索替代 
您的意思是: 

USB_HID_SET_REPORT_REQUEST does not work correctly

1,192 次查看
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

标签 (1)
0 项奖励
6 回复数

728 次查看
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 项奖励

728 次查看
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 项奖励

728 次查看
ivadorazinova
NXP Employee
NXP Employee

Hi Nicolas,

yes - it will be fixed in KSDK 1.3.

Have a nice day!

Iva

0 项奖励

728 次查看
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 项奖励

728 次查看
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 项奖励

728 次查看
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 项奖励