jazz 209 Posted October 28, 2012 Share Posted October 28, 2012 MSP430F550X is full-speed USB devices, 12 Mbits/s (1500 KB/s). Theoretical maximum transfer rate with 19 full-size packets is 19 * 64 bytes / ms = 1200 KB/s. And what about reality? I am working on CNC project, that is working just fine with uC/PC uart connection at 921600 bps. Problem is that uC/PC traffic is fast, but only few bytes are exchanging, and USB with generic drivers (usbser.sys / winusb.sys) is much slower than uart. Well, for uart connection PL2303HXD USB/uart bridge is used, and it can go fast, so what is the problem. Problem is in drivers, and USB for sure can go fast (with any data), but with customized driver, and this story I will leave for some other time. During last few weeks I done some tests regarding (CDC) transfer rate, but today I made application just for this. I read on many places on net that winusb.sys (WinXP SP2, and after) is much better (not only more stable) than usbser.sys. Was hoping that it will maybe resolve my (CNC) problems, but it didn't. Generic bulk transfer (winusb.sys) is not suported by TI USB Stack, anyway it was not problem to implement it. On uC side is the same (CDC) code, only enumeration data are different. On PC side, almost the same code. For CDC ReadFile/WriteFile are used and for generic bulk WinUsb_ReadPipe/WinUsb_WritePipe. I done my first MSP430F5510 board by p2p, long time ago. Later I done another (again p2p) with MSP430F5508. There are 2 4-pins connector, one on left side is for SBW, and another on right side is for USB. Just to show what was used for benchmark testing. If you have something like http://forum.43oh.co...elopment-board/ and poor USB transfer rate, problem is not in board, problem is in software, for sure. Here are the benchmark results for generic bulk transfer. Double buffering and/or ping pong method are/is not used (because it will not give better results). It was 4 MB transfer in both ways, first PC send to uC 4 MB, and after this uC send to PC 4 MB. For each test buffer size (WinUsb_ReadPipe/WinUsb_WritePipe) was changing, 4MB = number of loops * buffer size. It was not dummy transfer, because each side (uC/PC) was marking begining and ending side of packet, before sending, and other side (uC/PC) was checking this values after receiving. Size: 4 MB (4096 * 1 KB) Dir: MSP430 <- PC Time: 8344 ms Rate: 491 KB/s Dir: MSP430 -> PC Time: 8344 ms Rate: 491 KB/s Size: 4 MB (2048 * 2 KB) Dir: MSP430 <- PC Time: 6219 ms Rate: 659 KB/s Dir: MSP430 -> PC Time: 6234 ms Rate: 657 KB/s Size: 4 MB (1024 * 4 KB) Dir: MSP430 <- PC Time: 5157 ms Rate: 794 KB/s Dir: MSP430 -> PC Time: 5171 ms Rate: 792 KB/s Size: 4 MB (512 * 8 KB) Dir: MSP430 <- PC Time: 4656 ms Rate: 880 KB/s Dir: MSP430 -> PC Time: 4625 ms Rate: 886 KB/s Size: 4 MB (256 * 16 KB) Dir: MSP430 <- PC Time: 4375 ms Rate: 936 KB/s Dir: MSP430 -> PC Time: 4359 ms Rate: 940 KB/s Size: 4 MB (128 * 32 KB) Dir: MSP430 <- PC Time: 4219 ms Rate: 971 KB/s Dir: MSP430 -> PC Time: 4235 ms Rate: 967 KB/s This test confirmed information available on net, that host must make request with/for biggest possible data size, and in this case transfer rate will be higher. Changing host request from 1 KB to 32 KB, doubled transfer rate. RobG, Nytblade and bluehash 3 Quote Link to post Share on other sites
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.