Skip to main content
Visitor II
December 3, 2024
Question

I would like to know how to recognize an external USB device when connected to the STM32F4 series.

  • December 3, 2024
  • 1 reply
  • 790 views

I am using the STM32F401RE.
Currently, I purchased an external USB device, replicated the USB circuit that was installed by default, and connected it to the following pins:

{

CN7-5 (+3.3V)

CN7-17 (PA15)

CN10-14 (PA11)

CN10-12 (PA12)

CN7-19 (GND)

}

I tested to see if it would be recognized on the PC side, but it was not recognized.

I added the pin activation process for PA11 and PA12 in the main.c program, but it was not recognized.

Does anyone know why it is not being recognized by the PC?

    This topic has been closed for replies.

    1 reply

    Super User
    December 3, 2024

    USB is a very complicated module, implementing a very complicated protocol with multiple layers. You may want to do some basic reading about USB e.g. on wikipedia etc.

    What you are trying to do is to use it as Host (similarly to what PCs do). You thus need a USB Host software stack running at the mcu.

    Note, that such stack does not support any USB device, usually only Class devices such as Audio class or HID class (mouse and keyboard).

    JW