cancel
Showing results for 
Search instead for 
Did you mean: 

USB DEVICE and USB HOST in STM32F401 custom made board

gianlucarenzi
Associate III

Hello everyone

I am struggling with my custom board to be used as HOST or DEVICE.

In my board I have both connectors USB HOST A, and miniUSB Device connector in parallel.

When using an application as USB HOST for an USB Keyboard, everything is working fine.

When I am reprogram the application to be used as USB DEVICE CDC ACM Virtual Com Port it does not show in Linux, and there are a lot of error trying to connect and at least it fails loading USB Device. The device is HOST ONLY or DEVICE ONLY depends on which application I set. There is NO USD_ID pin connected as it works only for OTG/Dual Role stuff.

The hardware REMAINS the same. There are 2 22R Ohm resistor as impedence matching for lenght, and the lenght for each DATA LINE (D+ and D-) is less than 5 cm from the MCU.

The MCU is running with an external crystal/oscillator 8MHZ 49-HC style oscillator.

What can be checked to ensure the correct behaviour of the USB bus?

Regards,

Gianluca

1 REPLY 1
AScha.3
Chief II

so, if i get you right: same board, 2x software, host is working fine, device - does nothing.

my first idea: do you pull up dp+ by 1k5 to 3v3 ? (this is : hello host, here i am .)

or does your cpu this ? (see in rm...maybe.) or just try with a 1k5 soldered to dp+ and see...

If you feel a post has answered your question, please click "Accept as Solution".