2017-05-30 11:52 PM
Hi everybody,
I have used STM32 HAL libraries to communicate with PC using USB CDC. I want to send a huge amount of data to PC and so, the communication speed is very important to me. However I could get very low speed from the usb cdc.
I want to the maximum speed of the usb cdc using the HAL library? and which class of the usb devices is the best for my purpose?
I appreciate any attention
2017-06-05 08:15 AM
Nobody can help me?
2017-06-05 08:28 AM
>>
and which class of the usb devices is the best for my purpose?
MSC would tend to be the most efficient, reading large contiguous blocks of storage. Remember USB is half-duplex.
2017-06-05 11:07 AM
Thanks for your attention
I should use cdc class for some reason, however i do not know the maximum speed of the cdc in usb fs. How i can reach 1Mbyte/second speed?
2017-06-05 02:35 PM
I suspect that's on the optimistic side, you might get 80% of that. There have been some discussions about the CDC implementation here before, don't recall the outcome, not something I can provide support on.
2017-06-05 06:56 PM
Thanks Clive One. Speed of 80% of 1Mbyte/s is also good. However i reached a low speeds using Hal libraries. I use Device monitoring studio to log the received data from the stm32 and the speed is very low.
I used simple code to test the Cdc speed. In the main loop, i used cdc_fs_transmit to send data and the buffer size passed to this function is 4096kbyte. This is my code. However the speed is very low. Can anybody guide me about this?
thanks