Answer the question
In order to leave comments, you need to log in
How to implement USB host/device(virtual com port) device?
In general, there is a task to organize a USB host / device (virtual com port) on the STM32F105 microcontroller.
Unfortunately, I couldn't find any information on how to do this.
If anyone knows the algorithm of the operation of such a device, please tell me.
I am very interested in how the connection to the host and the connection of the flash drive will be recognized. After all, the host must output 5V, and according to the USB specification, the device cannot output voltage. According to the specification, in theory, one device cannot be both a host and a device. But in mobile phones it is implemented somehow.
Answer the question
In order to leave comments, you need to log in
The only way this can be done is to change the USB settings over time.
We configure the device as host, wait, say, 3 seconds, if the flash drive was not connected, then reconfigure the device to device and wait another 3 seconds for the computer to connect, if not, then switch to host again and so on.
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question