USB Composite HID-MSD device does not start

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

USB Composite HID-MSD device does not start

18,852 Views
jonperrin
Contributor I

We have been busy trying to use the Freescale USB library and create a Composite device – HID + MSD for VeraVanti.

We have had many issues with the USB library and the KDS tools (L). We have finally successfully built a Composite device that enumerates both the HID and MSD devices, however, we are getting several other errors that we do not have access to debugging.  We are getting errors as trapped by the USB analyzer – see below.  One is an Operations “Cancelled” and the other one is XACT_ERROR.  see attached pictures USB_Error_*.jpg.

Both the HID and MSD complete the enumeration process, but the MSD device gives an error 0xa – Device Cannot Start.  I have tested this on both your RAM-DISK example and on my custom code (based on your tutorial).  (note that your RAM-Disk example – does not work).

The XACT error : This error is reported to USB device drivers by the Microsoft USB core driver stack via the USB status code USBD_STATUS_XACT_ERROR if the USB EHCI host controller sets the Transaction Error (XactErr) bit in the USB transfer descriptor upon completion of the USB transfer. “

We are using the KHCI version of the USB Stack.  We tried to build the EHCI version, but it does not build.  I am convinced the error is in the USB stack as we cannot trap the error condition and all the descriptors are properly verified by both Windows and by the USB analyzer.

To test the MSD I am using the RAM-Disk example.  Eventually I will swap this out for a Spansion flash chip.

we are using the FRDM-KL26Z Freedom board to prototype.  

0 Kudos
Reply
5 Replies

17,756 Views
isaacavila
NXP Employee
NXP Employee

Hello Jon,

Here is a project based on HID_AUDIO example code located at <KSDK_1_2_PATH>/examples/frdmk64f/demo_apps/usb/device/composite, and here are the steps needed to run this demo:

1. Unzip code and copy it into next direction:  C:\Freescale\KSDK_1.2.0\examples\frdmk64f\demo_apps\usb\device\composite

2. Open KDS and import this new project

3. Replace files in source folder for the one located on the new project (C:\Freescale\KSDK_1.2.0\examples\frdmk64f\demo_apps\usb\device\composite\hid_msd). This step is added due when I tested this example in another computer, when i imported the project, all files related to HID_AUDIO project where linked instead the ones located in HID_MSD, so i had to link the correct files.

4. Build the project and download it. (Remember that this project needs ksdk_platform_lib and usbd_frdmk64 libs to be compiled previously)

I hope this can help you.

Best Regards,

Isaac

0 Kudos
Reply

17,756 Views
jonperrin
Contributor I

Hi Isaac,

The composite example that you helped us with works well. We are now moving to change the SD interface to a NOR flash interface using a Spansion library. The Spansion library requires a larger RAM to provide sector buffering so we moved to the FRDM-K64F board. The first step is to get the DSPI -0 working. I have tried to get it working with the a BLOCKING call – see the main in disk.c.

However, I am unable to get the DSPI_DRV_MasterTransferBlocking() to work. It always ends up in the default ISR, even though I have defined a SPI0_Interrupt.

Please help me get this SPI working as soon as you can. I am sure you can easily debug it.

Thanks,

-jon-

Jon Perrin

Glacier River Design, LLC

<mailto:Jon.perrin@glacierriver.com> Jon.perrin@glacierriver.com

<http://www.glacierriver.com> www.glacierriver.com

425-829-4151

0 Kudos
Reply

17,756 Views
isaacavila
NXP Employee
NXP Employee

Hi Jon,

Sorry for late response, i would like to invite you to create a new community post related to your SPI issue. I know SPI protocol but I am focused on USB. If you create a new post, SPI's expert can look at your problem and may help you to solve it.

Sorry for all inconvenience it may cause.

Best Regards

Isaac

0 Kudos
Reply

17,756 Views
isaacavila
NXP Employee
NXP Employee

Hi Jon,

I have already sent you a HID+MSD example implemented for FRDM-K64F board. You can use either keyboard or mouse support for HID class and for MSD you can select between internal RAM DISK application or SD_CARD application.

I am in process to make it a stand-alone project. By now, you can validate this example following the described steps listed in email from Joel.

I hope this can help you,

Best Regards,

Isaac Avila

0 Kudos
Reply

17,756 Views
mjbcswitzerland
Specialist V

Hi John

In case you don't have success with the framework that you are working with you can also check out a complete, industrially proven solution that will allow you to simply create reliable composite devices (with MSD + HID), including Kinetis + USB simulation so that there are no development/debugging complications.

Details at links below and supported in this forum.

Regards

Mark

Kinetis: µTasker Kinetis support

KL26: µTasker Kinetis FRDM-KL26Z support  / µTasker Kinetis Teensy LC support

USB User's Guide: http://www.utasker.com/docs/uTasker/USB_User_Guide.PDF

Composite USB: µTasker USB Device Configuration

For the complete "out-of-the-box" Kinetis experience and faster time to market

0 Kudos
Reply