MXRT685 USB speed

取消
显示结果 
显示  仅  | 搜索替代 
您的意思是: 

MXRT685 USB speed

675 次查看
12345
Contributor I

Hi,

 

I tried use MXRT685 to set USB higher speed , setting g_UsbDeviceHidGeneric.speed = USB_SPEED_SUPER; but usb packet analyzer shows the speed is the same( approximate 4Mbps), is there another code I need to modify?

 

  • (Test Computer) Intel I5-8265U (AsusPro P3540FA),
  • (Test Env.) MCUXpresso IDE v11.2.0 ,
  • (Test Code) evkmimxrt685_dev_hid_generic_bm

Setting : 

USB_device_config.h:

/*! @brief KHCI instance count */
#define USB_DEVICE_CONFIG_KHCI (0U)

/*! @brief EHCI instance count */
#define USB_DEVICE_CONFIG_EHCI (0U)

/*! @brief LPC USB IP3511 FS instance count */
#define USB_DEVICE_CONFIG_LPCIP3511FS (0U)

/*! @brief LPC USB IP3511 HS instance count */
#define USB_DEVICE_CONFIG_LPCIP3511HS (1U)

Hid_generic.c:

 

tatic void USB_DeviceApplicationInit(void)
{
USB_DeviceClockInit();
#if (defined(FSL_FEATURE_SOC_SYSMPU_COUNT) && (FSL_FEATURE_SOC_SYSMPU_COUNT > 0U))
SYSMPU_Enable(SYSMPU, 0);
#endif /* FSL_FEATURE_SOC_SYSMPU_COUNT */

/* Set HID generic to default state */
g_UsbDeviceHidGeneric.speed = USB_SPEED_SUPER;
g_UsbDeviceHidGeneric.attach = 0U;
g_UsbDeviceHidGeneric.hidHandle = (class_handle_t)NULL;
g_UsbDeviceHidGeneric.deviceHandle = NULL;
g_UsbDeviceHidGeneric.buffer[0] = (uint8_t *)&s_GenericBuffer0[0];
g_UsbDeviceHidGeneric.buffer[1] = (uint8_t *)&s_GenericBuffer1[0];

 

        

 

 

Thanks,

Tseng

标记 (1)
0 项奖励
回复
1 回复

655 次查看
jingpan
NXP TechSupport
NXP TechSupport

Hi @12345 ,

The USB device controller in RT685 hasn't USB_SPEED_SUPER speed mode. When USB cable connect, it will switch to USB_SPEED_HIGH. 

If you want higher speed, you can enlarge USB packet size. This example use interrupt endpoint type. And the default packet size is 8. You can set it to 1024. Then you'll get the maximum speed.

The definition is in usb_device_descriptor.h. Please find below definitions.

#define HS_HID_GENERIC_INTERRUPT_OUT_PACKET_SIZE (8U)
#define FS_HID_GENERIC_INTERRUPT_OUT_PACKET_SIZE (8U)
#define HS_HID_GENERIC_INTERRUPT_OUT_INTERVAL (0x04U) /* 2^(4-1) = 1ms */
#define FS_HID_GENERIC_INTERRUPT_OUT_INTERVAL (0x01U)

#define HS_HID_GENERIC_INTERRUPT_IN_PACKET_SIZE (8U)
#define FS_HID_GENERIC_INTERRUPT_IN_PACKET_SIZE (8U)
#define HS_HID_GENERIC_INTERRUPT_IN_INTERVAL (0x04U) /* 2^(4-1) = 1ms */
#define FS_HID_GENERIC_INTERRUPT_IN_INTERVAL (0x01U)

 

Regards,

Jing

0 项奖励
回复