MQX 4.2.0 USB Keyboard Device exapmle: Can not find where USB h/w module is initialised

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

MQX 4.2.0 USB Keyboard Device exapmle: Can not find where USB h/w module is initialised

526 Views
omkar_ppk
Contributor II

Hello everyone,

I used keyboard device example from MQX 4.2.0 USB v2 stack and ported it into the MQX 4.0.0 application successfully without any errors and warnings. When I connect my device to computer it is not getting detected.

On further investigation, I found out that there is no USB hardware initialization in keyboard.c I looked at mouse.c in USB device examples in MQX 4.2.0 USB examples it was not there either. So it does not look like it has happened by mistake. When I looked at mouse.c inside MQX 4.0.0 USB examples, I found there is driver install routine (_usb_device_driver_install()) that is called. This call is removed from the MQX 4.2.0 USB examples due to some reason.

While porting the USB v2 stack, I have removed old USB stack from the build so I don't think there is any issue with the old stack.

When I looked into the USB_Stack_Porting_User_Guide.pdf it says I need to call bsp_usb_dev_soc_init(); in the example. I tried to add it in the App_init() after all the structures are initialized, but I ran into errors. I had to change the static usb_status bsp_usb_dev_soc_init() to make it global. then I ran into the following error:

Error[Li005]: no definition for "_usb_khci_dev_callback_table" [referenced from usb_mk64_device.o(bsp.a)]

Also, I have built the new usb v2 stack (as BSP) successfully according to the USB_Stack_Porting_User_Guide.pdf 

I am using IAR workbench.

Could you please help me with this issue? My final objective is to get the device detected as USB keyboard on computer.

Thanks!

0 Kudos
1 Reply

325 Views
danielchen
NXP TechSupport
NXP TechSupport

Hi Omkar:

_usb_khci_dev_callback_table ,  is only existed in old usb stack,it is defined in usb/device/source/device/khci/callback_khci.c.  please check where you called this function. I think it should be removed from your project

Regards

Daniel

0 Kudos