Skip to main content
Graduate
January 11, 2024
Solved

STM32F407 to STM32F407 USB communications

  • January 11, 2024
  • 2 replies
  • 2275 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.

    2 replies

    TDKAnswer
    Super User
    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.

    BAWAuthor
    Graduate
    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.

     

     

    Graduate II
    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

    Super User
    January 11, 2024

    > unfortunately our architecture dictates using a USB.

    What architecture?

    JW

    BAWAuthor
    Graduate
    January 22, 2024

    The design for our product we are developing.