Speed Tests USB NXP RT1020 using CDC_VCOM_LITE and custom Windows program LogDue (30/11/2019)
I have modified the NXP example (usb_device_cdc_vcom_lite) for the RT1020 to test the USB throughput available using a virtual serial port (cdc_vcom). No driver is required under Windows 10 as the device enumerates as a serial port. The RT1020 transmits varying buffer sizes, using a bulk endpoint send routine. On the Windows side The program LogDue (excuse the name) opens the serial port and reads the transmitted data, displaying the throughput in bytes/s. You need to compile the program with the correct com port for your device in the main routine. Adjust to suit.
I varied the DATA_BUFF_SIZE in Virtual_Com.h for the RT1020 and recorded the results below. I didn't realise that getting such througput for an embedded microprocessor USB could be that easy. The only modifications I made to the code are in the included: Virtual_Com.c and Virtual_Com.h. I hope you find this useful.
DATA_BUFF_SIZE is in Virtual_Com.h of the RT1020 program
1. DATA_BUFF_SIZE = 256, 5MBytes/s
2. DATA_BUFF_SIZE = 512, 10MBytes/s
3. DATA_BUFF_SIZE = 1024,16MBytes/s
4. DATA_BUFF_SIZE = 2048,26MBytes/s
in Christ
Mark O'Farrell