Hi @krn
First, the interpretation depends on the product family in question. Messages are fully described in USB specification. The process to enumerate USB device is as follows.
- The process begins with the detection of a new USB device.
- The host detects the connection of the USB device.
- Then issues a reset signal to the device.
- The device responds by indicating its speed.
- The host requests the device descriptor from the device.
- Then checks if the device descriptor is correct.
- If yes, the process continues.
- If no, the enumeration fails.
- Now, Host assigns a unique address to the device.
- Host requests the configuration descriptor from the device.
- Host checks if the configuration descriptor is correct.
- If yes, the process continues.
- If no, the enumeration fails.
- Finally, the host sets the device configuration. The device enters its fully operational state, and the enumeration process is successful.
Now, the implementation of ST USB library,
usbd_core and usbh_core files include the implementation of the core state machine process and the enumeration and the control transfers processing.
usbd_ctlreq and usbh_ctlreq files include the implementation of the processing of the control requests required for the device enumeration.
usbh_ioreq and usbd_ioreq files include the implementation of different USB transactions process.
In host mode:

In device mode:

USB stack ensures the correct reception and decoding of the host request and then device state modification accordingly. For further details I suggest you this interesting WIKI