Skip to main content
Graduate II
November 18, 2024
Solved

The STM32 USB device library feels complicated

  • November 18, 2024
  • 4 replies
  • 1877 views

The structure of the stm32 usb device library feels very complex, is there any tutorial to clarify the structure?

I want to implement a UVC.

This is a picture I found on a wiki, but I can't make sense of it.

Shiina_0-1731945993216.png

For example, the file stm32xxx_ll_usb has no LL for the API name, but the USB core has LL for the API name, which is very confusing, and PCD HAL driver The name doesn't tell you what it does.

If the following structure is better applied

Shiina_0-1732001345711.jpeg

 

 

 

    This topic has been closed for replies.
    Best answer by Imen.D

    Hello @Shiina ,

    I recommend you refer to the following document: UM1734: STM32Cube™ USB device library.

    4 replies

    Imen.DAnswer
    Technical Moderator
    November 18, 2024

    Hello @Shiina ,

    I recommend you refer to the following document: UM1734: STM32Cube™ USB device library.

    Super User
    November 18, 2024

    @Shiina wrote:

    The structure of the stm32 usb device library feels very complex,


    well, USB itself is quite complex!

     


    @Shiina wrote:

    This is a picture I found on a wiki


    What Wiki? please give a link

    ShiinaAuthor
    Graduate II
    November 18, 2024
    Graduate
    November 18, 2024

    My impression is that STM USB stack with tangled pointers and bidirectional function calls between logical levels is much more complex than USB. ;)

    Technical Moderator
    November 19, 2024

    Hi @Shiina 

    Capturing USB traffic is an excellent recommendation! Correlate the captured USB traffic with your code to understand how specific operations in your code translate to USB packets.