2019-05-22 05:31 AM
Hello,
this is the first time I apply in this forum and I hope that I find the right answer to my question.
So, my goal is to connect two stm32 cards (for example: STM32F4) via USB.
Is it possible to do that? If yes ? how can I configure both cards with STM32cubeMx?
That is to say what are the necessary configurations for each card (Mode: device or host, class for FS IP: CDC, HID, MTP ...).
2019-05-22 05:40 AM
Yes, possible. One of them will be host and other - device. If both have OTG capable USB controller, they can switch roles.
(The new MCUs with type C controller may switch roles in type C way, I haven't tested).
-- pa
2019-05-22 06:01 AM
thank you fairly well for your response Pavel A.
I try to configure the two card One of them as a host and other -device but
the problem is in the communication type configuration for both cards (CDC , HID , MTP..)
Is there an example for communication between two stm32 cards?
2019-05-22 07:46 AM
There are examples of HOST and DEVICE instances, pick a pairing that suits goals/transfer paradigm.
Seems like a lot of work as there are more efficient ways to transfer data between two devices. ie people would normally wire a USART than do a CDC-to-CDC interface via USB. Consider purpose and practicality.