Skip to main content
Associate III
January 11, 2024
Solved

STM32F407 to STM32F407 USB communications

  • January 11, 2024
  • 5 replies
  • 2323 views

Hello,

I am new to STM32 parts and USB. We are looking at using USB to communicate between two STM32F407 boards.

Can anyone give some insight as to the best way to do this?

What USB classes should be used?

Any examples of this?

Thanks,

Brent

This topic has been closed for replies.
Best answer by TDK

In USB, one device is a host and one is a device. Set one board as a USB host, the other as a USB device, and use the CDC device class. This is possible.

But it's going to be a lot easier and more straightforward to use UART.

5 replies

TDK
TDKBest answer
January 11, 2024

In USB, one device is a host and one is a device. Set one board as a USB host, the other as a USB device, and use the CDC device class. This is possible.

But it's going to be a lot easier and more straightforward to use UART.

"If you feel a post has answered your question, please click ""Accept as Solution""."
BAWAuthor
Associate III
January 11, 2024

Thank you. I will start looking into that.

And yes I agree a UART would be easier, unfortunately our architecture dictates using a USB.

 

 

Andrei Chichak
Lead
January 11, 2024

Remember that a USB has a single host and multiple devices. You won't be able to plug a PC into this bus, it will want to be the host, and you've already programmed one of your '407s to be the host. But if your architecture just has one of the '407s as the host and 1+ '407s as devices, it'll just be difficult but not unlikely to work.

A

waclawek.jan
Super User
January 11, 2024

> unfortunately our architecture dictates using a USB.

What architecture?

JW

BAWAuthor
Associate III
January 22, 2024

The design for our product we are developing.