How to debug USB SDK examples

キャンセル
次の結果を表示 
表示  限定  | 次の代わりに検索 
もしかして: 

How to debug USB SDK examples

1,455件の閲覧回数
zcchai
Contributor I

Hello,

I am using a FRDM-KL82Z board, and have successfully imported and built several MCUXpreso USB SDK bare metal examples. 

However, I can only see the first message, such as "USB device HID generic demo", "USB device mass storage demo" in UART, nothing else. For the mass storage example, I couldn't see the new drive, and I couldn't even find the device in the system device tree (device manager or system information).  

I am stuck, no idea how to debug that. 

BTW, I have J-Link firmware on the board, so I can see the J-link's drive when I plug the board into PC, but not the drive the SDK sample is supposed to create.

And also, those USB SDK examples only show the standard device, HID, MSD, video etc, but not vendor class. Anyone knows where to get the vendor class examples? I need to send our own command to the device.

 

Thanks

Eric

ラベル(1)
タグ(2)
0 件の賞賛
返信
3 返答(返信)

1,203件の閲覧回数
zcchai
Contributor I

What a dumb I am, I found I only used the SDA USB port, which is why I didnt see the MSC drive show up in my host. There is another USB port on the board, if I connect that to host, I can see the USB drive show up.

But still, I don't know where can I find the Vendor Class example.

0 件の賞賛
返信

1,203件の閲覧回数
jorge_a_vazquez
NXP Employee
NXP Employee

Hi Zhenchuan Chai

In the usb_device_descriptor.h file in the sources folder you can find all the configuration of the descriptors for the USB example. For example, for the dev_msc_ramdisk_bm project code you can find:

#define USB_MSC_CLASS (0x08U)
/* scsi command set */
#define USB_MSC_SUBCLASS (0x06U)
/* bulk only transport protocol */
#define USB_MSC_PROTOCOL (0x50U)

Hope this helps

Best regards

Jorge Alcala

0 件の賞賛
返信

1,203件の閲覧回数
zcchai
Contributor I

Thanks, Jorge, it helps.

-Zhenchuan

0 件の賞賛
返信