USB Generic HIC -CMX Stack

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

USB Generic HIC -CMX Stack

1,948 Views
S_B_D
Contributor I

Hi,

 

I am reading how to patch CMXs generic HID demo to send and receive 64 byte payload packets.

Can someone post an explanation on how to modify the project to do this? Also, how to send the data and how to read the incoming PC data.

 

Your kind help is appreciated.

 

S.B.D

Labels (1)
0 Kudos
Reply
3 Replies

1,153 Views
S_B_D
Contributor I

No success yet...

Was anyone able to patch this project for Transmit/Receive 64 byte packets?

 

Thanks,

S.B.D

0 Kudos
Reply

1,153 Views
donw
Contributor IV

I have USB HID CMX code working with 64 byte packets:

change the '8' to '64' as below:

 

geh_config_descriptor:                        ;

   FCB  09,02,$25,00
   FCB  01,01,04,$40,00,03,09,00               

   FCB  09,04,00,00,01
   FCB  03,00,00                     ;HID,0,0
   FCB  05
   FCB  09,$21,00,01,00,01,$22              ;DESCRIPTOR+21  HID DESCRIPTOR
   FCB  $23,00                             ;size of geh_report_descriptor
   FCB  07,05,$81,03,64t,00,01   ;8 -> 64 bytes block size

 

also the USB_Report_Out     size must be 64

I don't think anything else needed changing, but do a search on this forum for HID. others have posted interesting stuff also.

don

 

0 Kudos
Reply

1,153 Views
S_B_D
Contributor I

Thanks for all the tips.

 

The problem was with the descriptor bitmap.

 

Here is the current bitmap:

 

const hcc_u8 geh_report_descriptor[] = {
    0x06, 0x00, 0xff,              // USAGE_PAGE (Vendor Defined Page 1)
    0x09, 0x01,                    // USAGE (Vendor Usage 1)
    0xa1, 0x01,                    // COLLECTION (Application)
    0x05, 0x08,                    //   USAGE_PAGE (LEDs)
    0x09, 0x4b,                    //   USAGE (Generic Indicator)
    0x15, 0x00,                    //   LOGICAL_MINIMUM (0)
    0x25, 0x0f,                    //   LOGICAL_MAXIMUM (1)
    0x75, 0x08,                    //   REPORT_SIZE (1) 
    0x95, 0x40,                    //   REPORT_COUNT (4)
    0x91, 0x02,                    //   OUTPUT (Data,Var,Abs)
    0x75, 0x00,                    //   REPORT_SIZE (1)
    0x95, 0x00,                    //   REPORT_COUNT (4)
    0x91, 0x03,                    //   OUTPUT (Cnst,Var,Abs)
    0x05, 0x09,                    //   USAGE_PAGE (Button)
    0x19, 0x01,                    //   USAGE_MINIMUM (Button 1)
    0x29, 0x02,                    //   USAGE_MAXIMUM (Button 2)
    0x75, 0x08,                    //   REPORT_SIZE (1)
    0x95, 0x40,                    //   REPORT_COUNT (2)
    0x81, 0x02,                    //   INPUT (Data,Var,Abs)
    0x75, 0x00,                    //   REPORT_SIZE (1)
    0x95, 0x00,                    //   REPORT_COUNT (6)
    0x81, 0x03,                    //   INPUT (Cnst,Var,Abs)
    0xc0                           //   END_COLLECTION
};

 

The report size is now 8 bits and the report count is 64.

I have 64 byte communication both upstream and downstream.

 

I still need to figure out why the upstream packets (JM to PC) sends the first byte as 0x00.

Does someone know how to fix this?

 

other than that everything looks stable.

 

I am currently able to get a 32kbyte/sec upstream data rate.

 

Will opening another endpoint enable me to reach the theoretical 64kbyte/sec?

 

S.B.D  

0 Kudos
Reply