AnsweredAssumed Answered

MK22 USB HID transfer packet speed

Question asked by Bernat Albet on Apr 1, 2020
Latest reply on Apr 8, 2020 by Bernat Albet

Hi,

 

I imported the generic HID example using MCUXpresso IDE, and changed the interval time to get the maximum theoretical transfer speed of 1000packets/s:

 

#define HS_HID_GENERIC_INTERRUPT_OUT_PACKET_SIZE (64U)
#define FS_HID_GENERIC_INTERRUPT_OUT_PACKET_SIZE (64U)
#define HS_HID_GENERIC_INTERRUPT_OUT_INTERVAL (0x01U)
#define FS_HID_GENERIC_INTERRUPT_OUT_INTERVAL (0x01U)

#define HS_HID_GENERIC_INTERRUPT_IN_PACKET_SIZE (64U)
#define FS_HID_GENERIC_INTERRUPT_IN_PACKET_SIZE (64U)
#define HS_HID_GENERIC_INTERRUPT_IN_INTERVAL (0x01U)
#define FS_HID_GENERIC_INTERRUPT_IN_INTERVAL (0x01U)

 

But I'm stuck at 500 packets/seconds no matter what I do. The main CPU is working at 80MHz, although the 500 packets/seconds are consistent in time, and no packets are lost, so it seems a configuration issue. As you can see I also changed the packet size (as well as the report count size of the report descriptor and the data buffer size) to 64 bytes, but the data is transferred up and down correctly with no difference vs the 1 byte of the imported example. What am I missing?

 

Off the topic and just to know, is there any plan to integrate some kind of tool in the MCUXpresso to configure the USB peripheral like we had in Processor Expert?

 

Thanks!

Outcomes