Problem on LPC1343 USBHID -- can't send/receive over 8 bytes?

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

Problem on LPC1343 USBHID -- can't send/receive over 8 bytes?

228 Views
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by wsyuen on Wed Jun 08 03:00:53 MST 2011
Dear All,

I modified the USBHID sample code to support an endpoint which will receive Feature Report.
I used a custom made PC software in order to send data to LPC1343 thr USBHID.
However, in the "USB_ReadEP" function in usbhw.c, it cannot receive data over 8 bytes (even the PC software sent over 8 bytes).
How to modify the code so that it can receive more than 8 bytes?
Please help.
Thank you very much.

wsyuen.
0 Kudos
1 Reply

193 Views
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by Ex-Zero on Wed Jun 08 03:38:10 MST 2011
Perhaps

usbcfg.h
#define USB_MAX_PACKET0     8
is limiting:

usbcore.c
uint8_t  EP0Buf[USB_MAX_PACKET0]; 
and:

usbdesc.c
/* USB Standard Device Descriptor */
const uint8_t USB_DeviceDescriptor[] = {
  USB_DEVICE_DESC_SIZE,              /* bLength */
  USB_DEVICE_DESCRIPTOR_TYPE,        /* bDescriptorType */
  WBVAL(0x0200), /* 2.00 */          /* bcdUSB */
  0x00,                              /* bDeviceClass */
  0x00,                              /* bDeviceSubClass */
  0x00,                              /* bDeviceProtocol */
  USB_MAX_PACKET0,                   /* bMaxPacketSize0 */
  WBVAL(0x1FC9),                     /* idVendor */
  WBVAL(0x8002),                     /* idProduct */
  WBVAL(0x0100), /* 1.00 */          /* bcdDevice */
  0x01,                              /* iManufacturer */
  0x02,                              /* iProduct */
  0x03,                              /* iSerialNumber */
  0x01                               /* bNumConfigurations: one possible configuration*/
};
0 Kudos