PE USB HID Mouse component, missing “hidef.h”, “derivative.h” and “types.h” files

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

PE USB HID Mouse component, missing “hidef.h”, “derivative.h” and “types.h” files

1,239 Views
quevedo
Contributor V

I am trying to use the FSL_USB_HID_Mouse component in a Codewarrior 10.6 project. After adding the component, setting the CPU clock,  and configuring the component to my CPU, I generate code and try to make a first build. I get an error for missing hidef.h file, and if I comment the line out, I get errors also for derivative.h and type.h missing files. I have my PE components updated to this date (June 22 2017), and I also tried it in KDS with the same errors.

How can I get the missing files?

Thanks in advance,

Antonio

Tags (2)
0 Kudos
4 Replies

961 Views
quevedo
Contributor V

Hello Erich, nice to talk to you again.

Yes, you are right. Now I am using the USB_FSL stack and adding the Mouse component inside it. The files are not missing anymore.

I am using a FRDM-KL25 board with Codewarrior 10.7, I tried it on both 10.6 and 10.7 and the result was the same. After using the whole USB stack component, I got a compilation error (USB1_SendChar undeclared) in the Shell referenced component, which I removed. Now it is compiling wholly.

When I tried to debug, I got a debug halt from the hardware fault interrupt vector. It happened inside the USB0_Init() function, when it tries to access the USB0_CTL register. It seems that clock gating for USB module was not active, so I have set the corresponding bit in SIM_SCGC4 (in the beginning of USB0_Init). Now the program is running, but my wondows 10 computer does not recognize the USB device. I got an error 43 , failure in requesting device descriptor. I thought the PE component would have a standard descriptor and VID/PID. What am I missing? and why the original USB stack component is not turning on USB clock gating?

Thank you

Antonio

0 Kudos

961 Views
BlackNight
NXP Employee
NXP Employee

Hi Antonio,

without seeing your project, it is really hard to tell. It seem to me that you might have misconfigured the USB_Init component. Have you tried the project I pointed you to on GitHub or the one attached to my previous response?

And yes, the component includes sending the USB desriptor. But if your USB settings are wrong or if you have not configured the clocks in the CPU component for USB, communication won't work.

 

Erich

0 Kudos

961 Views
BlackNight
NXP Employee
NXP Employee

Hi Antonio,

for which target/microcontroller?

As you did not share your project: the component is part of the FSL_USB_Stack component as a subcomponent):

pastedImage_1.png

There is an example project on GitHub (mcuoneclipse/Examples/CodeWarrior/FRDM-KL25Z/Freedom_USB_HID_Mouse at master · ErichStyger/mcuonecli... ) for KL25Z (and as well attached here). I have posted a tutorial about it here: Using the FRDM-KL25Z as a USB Mouse Device | MCU on Eclipse 

I hope this helps,

Erich

961 Views
quevedo
Contributor V

Hello Erich, nice to talk to you again.

 

Yes, you are right. Now I am using the USB_FSL stack and adding the Mouse component inside it. The files are not missing anymore.

 

I am using a FRDM-KL25 board with Codewarrior 10.7, I tried it on both 10.6 and 10.7 and the result was the same. After using the whole USB stack component, I got a compilation error (USB1_SendChar undeclared) in the Shell referenced component, which I removed. Now it is compiling wholly.

 

When I tried to debug, I got a debug halt from the hardware fault interrupt vector. It happened inside the USB0_Init() function, when it tries to access the USB0_CTL register. It seems that clock gating for USB module was not active, so I have set the corresponding bit in SIM_SCGC4 (in the beginning of USB0_Init). Now the program is running, but my wondows 10 computer does not recognize the USB device. I got an error 43 , failure in requesting device descriptor. I thought the PE component would have a standard descriptor and VID/PID. What am I missing? and why the original USB stack component is not turning on USB clock gating?

 

Thank you

 

Antonio

0 Kudos