Skip to main content
bully
Senior
April 17, 2020
Solved

What is the easiest way to connect two STM32F769 systems over USB ?

  • April 17, 2020
  • 5 replies
  • 1294 views

Hello,

I have two nearly identical boards and I need to connect them over USB.

One possiblle way is using "Virtual Com Port", but haven't found anything about how to implement it on host device.

Is there any example of doing this or any other maybe good alternative for this connection.

I don't need really high speed, few bytes every 100msec...

Thanks in advance,

regards,

Bully.

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

The easiest possible way is to use UARTs.

USB FS data pins can be mapped to UART4 Tx/Rx, USB HS pins can be mapped to USART1 Tx/Rx.

Use the swap Tx/Rx feature of the UART on one side, except when connecting USB FS on one MCU to the USB HS pins of the other.

5 replies

Tesla DeLorean
Guru
April 17, 2020

STM32Cube_FW_F7_V1.16.0\Projects\STM32F769I_EVAL\Applications\USB_Device\CDC_Standalone

STM32Cube_FW_F7_V1.16.0\Projects\STM32F769I_EVAL\Applications\USB_Host\CDC_Standalone

Tips, Buy me a coffee, or three.. PayPal Venmo (See Profile) Up vote any posts that you find helpful, it shows what's working..
Pavel A.
April 17, 2020

Except that USB is not the easiest way to connect two boards, if you only need "few bytes every 100msec".

-- pa

bully
bullyAuthor
Senior
April 18, 2020

Hi,

I agree that USB is not the optimal choice, but I cannot choose.

So, I have USB between to always powered host and device and I'd like to find a way not to complicate too much with protocol, devce classes etc...

So, I'm eeking the way to implement such communication in the easiest possible way through USB bus (I can probably skip device detection, exchange of information, etc...)

Thanks in advance,

regards.

berendi
berendiBest answer
Principal
April 18, 2020

The easiest possible way is to use UARTs.

USB FS data pins can be mapped to UART4 Tx/Rx, USB HS pins can be mapped to USART1 Tx/Rx.

Use the swap Tx/Rx feature of the UART on one side, except when connecting USB FS on one MCU to the USB HS pins of the other.

bully
bullyAuthor
Senior
April 20, 2020

Thanks all for ideas... I couldn't get through with USB, probably because of a non-standard voltage on VBUS.

So wen't the UART way and used SWAP bit feature. Communication works...