Hi,
I'm still learning here, but I need some help.
I have a KL25Z board and am trying to hook up this USB display I have. I am using the USBDevice library. The problem is, I don't see my USB device power up. When I plug it directly into an outlet USB plug, I see the screen turn on. When I plug it into the board, nothing turns on.
I assume I have to 'power on'.
Here's my descriptor for the USBHID Device:
Descriptor Setup
static uint8_t configurationDescriptor[] = {
CONFIGURATION_DESCRIPTOR_LENGTH,// bLength
CONFIGURATION_DESCRIPTOR, // bDescriptorType
LSB(TOTAL_DESCRIPTOR_LENGTH), // wTotalLength (LSB)
MSB(TOTAL_DESCRIPTOR_LENGTH), // wTotalLength (MSB)
0x01, // bNumInterfaces
DEFAULT_CONFIGURATION, // bConfigurationValue
0x00, // iConfiguration
C_RESERVED, // bmAttributes [CHANGED THIS LINE]
C_POWER(25), // bMaxPower [CHANGED THIS LINE]
INTERFACE_DESCRIPTOR_LENGTH, // bLength
INTERFACE_DESCRIPTOR, // bDescriptorType
0x00, // bInterfaceNumber
0x00, // bAlternateSetting
0x02, // bNumEndpoints
HID_CLASS, // bInterfaceClass
HID_SUBCLASS_NONE, // bInterfaceSubClass
HID_PROTOCOL_NONE, // bInterfaceProtocol
0x00, // iInterface
HID_DESCRIPTOR_LENGTH, // bLength
HID_DESCRIPTOR, // bDescriptorType
LSB(HID_VERSION_1_11), // bcdHID (LSB)
MSB(HID_VERSION_1_11), // bcdHID (MSB)
0x00, // bCountryCode
0x01, // bNumDescriptors
REPORT_DESCRIPTOR, // bDescriptorType
(uint8_t)(LSB(this->reportDescLength())), // wDescriptorLength (LSB)
(uint8_t)(MSB(this->reportDescLength())), // wDescriptorLength (MSB)
ENDPOINT_DESCRIPTOR_LENGTH, // bLength
ENDPOINT_DESCRIPTOR, // bDescriptorType
PHY_TO_DESC(EPINT_IN), // bEndpointAddress
E_INTERRUPT, // bmAttributes
LSB(MAX_PACKET_SIZE_EPINT), // wMaxPacketSize (LSB)
MSB(MAX_PACKET_SIZE_EPINT), // wMaxPacketSize (MSB)
1, // bInterval (milliseconds)
ENDPOINT_DESCRIPTOR_LENGTH, // bLength
ENDPOINT_DESCRIPTOR, // bDescriptorType
PHY_TO_DESC(EPINT_OUT), // bEndpointAddress
E_INTERRUPT, // bmAttributes
LSB(MAX_PACKET_SIZE_EPINT), // wMaxPacketSize (LSB)
MSB(MAX_PACKET_SIZE_EPINT), // wMaxPacketSize (MSB)
1, // bInterval (milliseconds)
};
The key lines I changed from the default descriptor were:
C_RESERVED, bmAttributes - I removed the SELF_POWERED
C_POWER(50), bMaxPower - I set the max power to 50mA (According to the Max Operating Current from my device sheet).
When I connect to my USBHID like this...
hid = new USBHID(8, 8, STORM_VID, USB_DISPLAY_PID, 0x0001);
hid->connect(true);
It doesn't connect because I believe it's not powered on.
Is there anything else I need to do?
Thanks!
Hi,
I'm still learning here, but I need some help.
I have a KL25Z board and am trying to hook up this USB display I have. I am using the USBDevice library. The problem is, I don't see my USB device power up. When I plug it directly into an outlet USB plug, I see the screen turn on. When I plug it into the board, nothing turns on.
I assume I have to 'power on'.
Here's my descriptor for the USBHID Device:
Descriptor Setup
The key lines I changed from the default descriptor were:
C_RESERVED, bmAttributes - I removed the SELF_POWERED C_POWER(50), bMaxPower - I set the max power to 50mA (According to the Max Operating Current from my device sheet).
When I connect to my USBHID like this...
It doesn't connect because I believe it's not powered on.
Is there anything else I need to do?
Thanks!