Electronic – Making a high speed USB communication from STM32F4 and Java on Linux PC

ccommunicationstm32usb

I have a STM32F4Discovery board and I try to communicate between a c program(with no OS)on the board and a Java program on ubuntu pc. I have found many tutorials like this about USB but they all try to make a RS232 like serial port which is too slow(like 9600 baud or max 14.4Kbps).

Right now I am lost and I need to find out what how should I make this. Is it possible to make a high speed communication in this case and how fast it could be? USB 2.0 specs says it could be up to 480Mbps. Could you tell me with which library is this possible? And is there any best practice available to follow for making a two way communication over USB?

I really appreciate any hints.

Best Answer

USB protocol is divided into a number of classes , such as HID,Mass Storage,Audio etc.

1.You should try to look into a class that requires to transfer data at a high bit rate, examples of such classes would be Video or Mass Storage devices. Classes which use bulk or isochronous packets to transfer data over the bus will have high bit rates,because they have a larger packet size and can have a bigger time slots to use the bus.

2.Then you should look at the code samples shipped with your board for the these above mentioned classes.

Could you give a little more insight on what data do you want to transfer between the board and the PC?