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.
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.
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