USB stack for keyboard

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

USB stack for keyboard

1,613 Views
sandeepnaik
Contributor I

hi, 

we are using K60 controller for interfacing with USB keyboard. from freescale usb stackv.4.1.1, we got one example file 'USB_HID_OTG_MK60DN512zvLq10.' similar to that example file, when i tried to include the processor expert component USB_HID_CLASS in our source code, there is an option for OTG_MAX3353(in reference component). since we are not using OTG_MAX3353, is there any option to disable MAX3353 in processor expert?

also from other site, we got  FSL_USB_STACK. processor expert component

but FSL_USB_HID_KEYBOARD_DEVICE is not included in that.  kindly guide for proper usb stack for keyboard.

 from where should i download  FSL_USB_HID_KEYBOARD_DEVICE.PEupd component

0 Kudos
Reply
5 Replies

1,349 Views
sandeepnaik
Contributor I

hi,

when i tried to add component FSL_USB_STACK,  there is no option for HID_KEYBOARD. so i included FSL_USB_HID_KEYBOARD component directly.  and no init_USB_OTG components are added since we have already added USB_LDD component(as host) for interfacing pendrive . if i add init_USB_OTG, there will be pin sharing error. ie, pin is already used. 

is it possible to use same USB pin as host and OTG ?  because when i built the project i m getting so many errors like - ')' expected in HIDK1.h 

for byte HIDK1_send(byte modifier,byte key); 

similar to this, number of errors are appearing. 

is it possible to use same USB pin as host and OTG ? so in USB_LDD component, i need to select host or OTG?

0 Kudos
Reply

1,349 Views
BlackNight
NXP Employee
NXP Employee

If you are seeing that 'HID Keyboard Device', then you are not using the correct (and latest) component(s).

pastedImage_1.png

Make sure you have loaded *both* .PEUpd file and latest version from SourceForge (see McuOnEclipse Releases on SourceForge | MCU on Eclipse ).

And you *have* to use the Init_USB_OTG component with its settings, you cannot use the other _LDD component you mention. It seems that your other setup is for a host? keep in mind that this HID Keyboard is for a device, not for a host setup. You certainly technically could switch between OTG and host mode, but this requires deep understanding of how USB and the USB block/driver works on the K60.

I hope this helps,

Erich

0 Kudos
Reply

1,349 Views
sandeepnaik
Contributor I

from the above link Processor Expert Component *.PEupd Files on GitHub | MCU on Eclipse ,

we have already downloaded FSL_USB_STACK component . but the keyboard stack (FSL_USB_HID_Keyboard_Device)is missing when i imported in to the processor expert.

kindly guide me from where to download  the processor exprt component for FSL_USB_HID_Keyboard_Device.

1. demo project - interfacing usb keyboard  to MK60DN512z
2. version of CodeWarrior -10.4

3. USB statck version-4.1.1

there is an example file in usb stack. but that processor expert component uses MAX3353. but we are not using that IC. 

 

0 Kudos
Reply

1,349 Views
ZhangJennie
NXP TechSupport
NXP TechSupport

Hi Sandeep,

I downloaded the components from the link I provided ( Processor Expert Component *.PEupd Files on GitHub | MCU on Eclipse  ), FSL_USB_HID_Keyboard_Device is available. please try disable the filter and see if this component exists

pastedImage_2.png

when you use it, make sure you set device class as HID Keyboard Device :

pastedImage_1.png

How does it works?


Have a great day,
Jennie Zhang

-----------------------------------------------------------------------------------------------------------------------
Note: If this post answers your question, please click the Correct Answer button. Thank you!
-----------------------------------------------------------------------------------------------------------------------

0 Kudos
Reply

1,349 Views
ZhangJennie
NXP TechSupport
NXP TechSupport

Hello Sandeep,

you need download and install pe component from this url:

Processor Expert Component *.PEupd Files on GitHub | MCU on Eclipse 

I also recommend this article from Erich

Using the FRDM-KL25Z as USB Keyboard | MCU on Eclipse 


Have a great day,
Jennie Zhang

-----------------------------------------------------------------------------------------------------------------------
Note: If this post answers your question, please click the Correct Answer button. Thank you!
-----------------------------------------------------------------------------------------------------------------------

0 Kudos
Reply